zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From javicacheiro <...@git.apache.org>
Subject [GitHub] zookeeper pull request #413: WriteLock recipe: Fix bug in znode ordering whe...
Date Fri, 03 Nov 2017 14:33:53 GMT
GitHub user javicacheiro opened a pull request:

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

    WriteLock recipe: Fix bug in znode ordering when the sessionId is part of the znode name

    This PR solves a bug in the WriteLock recipe related to the ordering the znodes. 
    
    In the original version when the nodes are sorted in WriteLock.java using a TreeSet the
whole znode path is taken into account and not just the sequence number. 
    
    This causes an issue when the sessionId is included in the znode path because a znode
with a lower sessionId will appear as lower than other znode with a higher sessionId even
if its sequence number is bigger. In specific situations this ended with two clients holding
the lock at the same time.

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

    $ git pull https://github.com/javicacheiro/zookeeper fix_writelock

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

    https://github.com/apache/zookeeper/pull/413.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 #413
    
----
commit f9c581d4d92136f1ab718f5c24ae836c1c93dd03
Author: Javier Cacheiro <alcachi@gmail.com>
Date:   2017-11-03T14:24:36Z

    Fix bug in znode ordering when the sessionId is part of the znode name

----


---

Mime
View raw message