zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maoling <...@git.apache.org>
Subject [GitHub] zookeeper pull request #608: ZOOKEEPER-2913:testEphemeralNodeDeletion is fla...
Date Sun, 26 Aug 2018 09:49:22 GMT
GitHub user maoling opened a pull request:

    https://github.com/apache/zookeeper/pull/608

    ZOOKEEPER-2913:testEphemeralNodeDeletion is flaky

    - The test code is assuming the follower is up to date, which without a `sync` call.when
regression,the follower could not catch up with the leader,so the `/e1` patch still exists
    - this issue is not very easy to reproduce,but we can change the codes in the `FollowerZooKeeperServer.commit()
` ,just like this:
    
    ```
           Request request = pendingTxns.remove();
            if (request.getHdr().getType() == -11) {
            	try {
        			Thread.sleep(200);
        		} catch (InterruptedException e) {
        			
        		}
            }
            commitProcessor.commit(request);
    ```
    slow down the commit to simulate the scenario,then we can check the correctness of this
patch
    -------------------------------------------**appendix: zk.sync() doc:**------------------------------------------
    
    > ZooKeeper does not guarantee that at every instance in time, two different clients
will have identical views of ZooKeeper data. Due to factors like network delays, one client
may perform an update before another client gets notified of the change. Consider the scenario
of two clients, A and B. If client A sets the value of a znode /a from 0 to 1, then tells
client B to read /a, client B may read the old value of 0, depending on which server it is
connected to. If it is important that Client A and Client B read the same value, Client B
should should call the sync() method from the ZooKeeper API method before it performs its
read.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/maoling/zookeeper ZOOKEEPER-2913

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/608.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #608
    
----
commit 09c90dc0801b9dc1d4427be144e81819da230eea
Author: maoling <maoling199210191@...>
Date:   2018-08-24T10:21:04Z

    ZOOKEEPER-2913:testEphemeralNodeDeletion is flaky

----


---

Mime
View raw message