You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2016/01/11 01:30:28 UTC

[3/3] curator git commit: oops - bad commit for this file

oops - bad commit for this file


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/45332f30
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/45332f30
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/45332f30

Branch: refs/heads/master
Commit: 45332f301ea5747b91c821e9f09dd66cad710b9f
Parents: 8dff2d7
Author: randgalt <ra...@apache.org>
Authored: Mon Dec 28 10:23:14 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Mon Dec 28 10:23:14 2015 -0500

----------------------------------------------------------------------
 .../curator/framework/recipes/queue/DistributedQueue.java       | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/45332f30/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
index 3100fde..3b63956 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
@@ -583,7 +583,6 @@ public class DistributedQueue<T> implements QueueBase<T>
         final Semaphore processedLatch = new Semaphore(0);
         final boolean   isUsingLockSafety = (lockPath != null);
         int             min = minItemsBeforeRefresh;
-        int             submittedQty = 0;
         for ( final String itemNode : children )
         {
             if ( Thread.currentThread().isInterrupted() )
@@ -603,6 +602,7 @@ public class DistributedQueue<T> implements QueueBase<T>
             {
                 if ( refreshOnWatch && (currentVersion != childrenCache.getData().version) )
                 {
+                    processedLatch.release(children.size());
                     break;
                 }
             }
@@ -642,10 +642,9 @@ public class DistributedQueue<T> implements QueueBase<T>
                     }
                 }
             );
-            ++submittedQty;
         }
 
-        processedLatch.acquire(submittedQty);
+        processedLatch.acquire(children.size());
     }
 
     private enum ProcessMessageBytesCode