GitHub user maoling opened a pull request:

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

    ZOOKEEPER-1011:fix Java Barrier Documentation example's race condition 
issue and polish up the Barrier Documentation

    - This patch fix the race condition of double barrier and avoid the herd 
effect.
    - To focus on the core logic and keep the codes short and clean,don't 
consider some parameters check,connect loss,the timeout for wait ....etc.The 
thoughtful codes can be found in the implements of `DistributedDoubleBarrier` 
of `curator-recipes`.
    - For test,you can change the `QTY` in the barrierTest from small 
one(1,2,3) to large one(1000,5000,10000),then observer the printed log to check 
the correctness of this patch.
    - more details in 
[ZOOKEEPER-1011](https://issues.apache.org/jira/browse/ZOOKEEPER-1011) .Thanks 
for
     
[semihsalihoglu](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=semihsalihoglu)
 reporting this issue.


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

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

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

    https://github.com/apache/zookeeper/pull/618.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 #618
    
----
commit ebfd81ecf9a7159535de51a3f8b63003fd9fad8c
Author: maoling <maoling199210191@...>
Date:   2018-09-03T07:29:30Z

    ZOOKEEPER-1011:fix Java Barrier Documentation example's race condition 
issue and polish up the Barrier Documentation

----


---

Reply via email to