curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randgalt <...@git.apache.org>
Subject [GitHub] curator pull request: Curator locks leaving dangling watches
Date Wed, 21 May 2014 14:13:40 GMT
Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/curator/pull/7#discussion_r12897669
  
    --- Diff: curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java
---
    @@ -295,9 +295,9 @@ private boolean internalLockLoop(long startMillis, Long millisToWait,
String our
     
                         synchronized(this)
                         {
    -                        Stat stat = client.checkExists().usingWatcher(watcher).forPath(previousSequencePath);
    -                        if ( stat != null )
    +                        try 
                             {
    +                            byte[] data = client.getData().usingWatcher(watcher).forPath(previousSequencePath);
    --- End diff --
    
    Very interesting. I can see how the previous code would leave watches around. This is
a very big change though. I'll run the tests with it and think about edge cases.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message