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:50 UTC

[01/10] curator git commit: [maven-release-plugin] prepare release apache-curator-2.9.1-SNAPSHOT

Repository: curator
Updated Branches:
  refs/heads/CURATOR-3.0 5c34cb10b -> 100dd3f26


[maven-release-plugin] prepare release apache-curator-2.9.1-SNAPSHOT


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

Branch: refs/heads/CURATOR-3.0
Commit: 722bbc470025f49b8df70789da600ff70e7eb380
Parents: 722d0ce
Author: Cam McKenzie <ca...@apache.org>
Authored: Wed Oct 21 10:59:40 2015 +1100
Committer: Cam McKenzie <ca...@apache.org>
Committed: Wed Oct 21 10:59:40 2015 +1100

----------------------------------------------------------------------
 curator-client/pom.xml             | 4 ++--
 curator-examples/pom.xml           | 2 +-
 curator-framework/pom.xml          | 4 ++--
 curator-recipes/pom.xml            | 4 ++--
 curator-test/pom.xml               | 4 ++--
 curator-x-discovery-server/pom.xml | 4 ++--
 curator-x-discovery/pom.xml        | 4 ++--
 curator-x-rpc/pom.xml              | 4 ++--
 pom.xml                            | 4 ++--
 9 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/722bbc47/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index 9a12344..e23d60a 100644
--- a/curator-client/pom.xml
+++ b/curator-client/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1-SNAPSHOT</version>
+        <version>2.9.1</version>
     </parent>
 
     <artifactId>curator-client</artifactId>
-    <version>2.9.1-SNAPSHOT</version>
+    <version>2.9.1</version>
     <packaging>bundle</packaging>
 
     <name>Curator Client</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/722bbc47/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index 67505ad..9c5cd31 100644
--- a/curator-examples/pom.xml
+++ b/curator-examples/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1-SNAPSHOT</version>
+        <version>2.9.1</version>
     </parent>
 
     <artifactId>curator-examples</artifactId>

http://git-wip-us.apache.org/repos/asf/curator/blob/722bbc47/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index 3dbbdbb..4e2da1c 100644
--- a/curator-framework/pom.xml
+++ b/curator-framework/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1-SNAPSHOT</version>
+        <version>2.9.1</version>
     </parent>
 
     <artifactId>curator-framework</artifactId>
-    <version>2.9.1-SNAPSHOT</version>
+    <version>2.9.1</version>
     <packaging>bundle</packaging>
 
     <name>Curator Framework</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/722bbc47/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index bbcb749..d3e9851 100644
--- a/curator-recipes/pom.xml
+++ b/curator-recipes/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1-SNAPSHOT</version>
+        <version>2.9.1</version>
     </parent>
 
     <artifactId>curator-recipes</artifactId>
-    <version>2.9.1-SNAPSHOT</version>
+    <version>2.9.1</version>
     <packaging>bundle</packaging>
 
     <name>Curator Recipes</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/722bbc47/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index 2f5455d..4e2d68d 100644
--- a/curator-test/pom.xml
+++ b/curator-test/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1-SNAPSHOT</version>
+        <version>2.9.1</version>
     </parent>
 
     <artifactId>curator-test</artifactId>
-    <version>2.9.1-SNAPSHOT</version>
+    <version>2.9.1</version>
 
     <name>Curator Testing</name>
     <description>Unit testing utilities.</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/722bbc47/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index da80059..1879826 100644
--- a/curator-x-discovery-server/pom.xml
+++ b/curator-x-discovery-server/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1-SNAPSHOT</version>
+        <version>2.9.1</version>
     </parent>
 
     <artifactId>curator-x-discovery-server</artifactId>
-    <version>2.9.1-SNAPSHOT</version>
+    <version>2.9.1</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery Server</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/722bbc47/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index bcb896f..df36979 100644
--- a/curator-x-discovery/pom.xml
+++ b/curator-x-discovery/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1-SNAPSHOT</version>
+        <version>2.9.1</version>
     </parent>
 
     <artifactId>curator-x-discovery</artifactId>
-    <version>2.9.1-SNAPSHOT</version>
+    <version>2.9.1</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/722bbc47/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index 2b16996..74f1251 100644
--- a/curator-x-rpc/pom.xml
+++ b/curator-x-rpc/pom.xml
@@ -22,12 +22,12 @@
     <parent>
         <artifactId>apache-curator</artifactId>
         <groupId>org.apache.curator</groupId>
-        <version>2.9.1-SNAPSHOT</version>
+        <version>2.9.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>curator-x-rpc</artifactId>
-    <version>2.9.1-SNAPSHOT</version>
+    <version>2.9.1</version>
 
     <name>Curator RPC Proxy</name>
     <description>A proxy that bridges non-java environments with the Curator framework and recipes</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/722bbc47/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c13a8b5..3e0844a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
     <groupId>org.apache.curator</groupId>
     <artifactId>apache-curator</artifactId>
-    <version>2.9.1-SNAPSHOT</version>
+    <version>2.9.1</version>
     <packaging>pom</packaging>
 
     <name>Apache Curator</name>
@@ -98,7 +98,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git
         </developerConnection>
-        <tag>apache-curator-2.8.0</tag>
+        <tag>apache-curator-2.9.1-SNAPSHOT</tag>
     </scm>
 
     <issueManagement>


[04/10] curator git commit: [maven-release-plugin] prepare release apache-curator-2.9.1

Posted by ra...@apache.org.
[maven-release-plugin] prepare release apache-curator-2.9.1


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

Branch: refs/heads/CURATOR-3.0
Commit: 95f5515cfac88b275a2dae5798089498e0374716
Parents: 1bd5fa5
Author: Cam McKenzie <ca...@apache.org>
Authored: Mon Oct 26 11:05:30 2015 +1100
Committer: Cam McKenzie <ca...@apache.org>
Committed: Mon Oct 26 11:05:30 2015 +1100

----------------------------------------------------------------------
 curator-client/pom.xml             | 4 ++--
 curator-examples/pom.xml           | 2 +-
 curator-framework/pom.xml          | 4 ++--
 curator-recipes/pom.xml            | 4 ++--
 curator-test/pom.xml               | 4 ++--
 curator-x-discovery-server/pom.xml | 4 ++--
 curator-x-discovery/pom.xml        | 4 ++--
 curator-x-rpc/pom.xml              | 4 ++--
 pom.xml                            | 4 ++--
 9 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/95f5515c/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index 949712c..6eb4428 100644
--- a/curator-client/pom.xml
+++ b/curator-client/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.2</version>
     </parent>
 
     <artifactId>curator-client</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.2</version>
     <packaging>bundle</packaging>
 
     <name>Curator Client</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/95f5515c/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index e1a9e7c..8dce22b 100644
--- a/curator-examples/pom.xml
+++ b/curator-examples/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.2</version>
     </parent>
 
     <artifactId>curator-examples</artifactId>

http://git-wip-us.apache.org/repos/asf/curator/blob/95f5515c/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index c63f90f..6a05d84 100644
--- a/curator-framework/pom.xml
+++ b/curator-framework/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.2</version>
     </parent>
 
     <artifactId>curator-framework</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.2</version>
     <packaging>bundle</packaging>
 
     <name>Curator Framework</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/95f5515c/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index 029b385..f281364 100644
--- a/curator-recipes/pom.xml
+++ b/curator-recipes/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.2</version>
     </parent>
 
     <artifactId>curator-recipes</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.2</version>
     <packaging>bundle</packaging>
 
     <name>Curator Recipes</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/95f5515c/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index 472a083..61cc672 100644
--- a/curator-test/pom.xml
+++ b/curator-test/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.2</version>
     </parent>
 
     <artifactId>curator-test</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.2</version>
 
     <name>Curator Testing</name>
     <description>Unit testing utilities.</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/95f5515c/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index 14c1111..9343cf2 100644
--- a/curator-x-discovery-server/pom.xml
+++ b/curator-x-discovery-server/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.2</version>
     </parent>
 
     <artifactId>curator-x-discovery-server</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.2</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery Server</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/95f5515c/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index 291c18b..d367db7 100644
--- a/curator-x-discovery/pom.xml
+++ b/curator-x-discovery/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.2</version>
     </parent>
 
     <artifactId>curator-x-discovery</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.2</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/95f5515c/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index 5b51902..ac7e4cf 100644
--- a/curator-x-rpc/pom.xml
+++ b/curator-x-rpc/pom.xml
@@ -22,12 +22,12 @@
     <parent>
         <artifactId>apache-curator</artifactId>
         <groupId>org.apache.curator</groupId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.2</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>curator-x-rpc</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.2</version>
 
     <name>Curator RPC Proxy</name>
     <description>A proxy that bridges non-java environments with the Curator framework and recipes</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/95f5515c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index be3f240..9a4a546 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
     <groupId>org.apache.curator</groupId>
     <artifactId>apache-curator</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.2</version>
     <packaging>pom</packaging>
 
     <name>Apache Curator</name>
@@ -98,7 +98,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git
         </developerConnection>
-        <tag>apache-curator-2.8.0</tag>
+        <tag>apache-curator-2.9.1</tag>
     </scm>
 
     <issueManagement>


[03/10] curator git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/curator

Posted by ra...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/curator


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

Branch: refs/heads/CURATOR-3.0
Commit: 1bd5fa560dd68d691049c1e90b2a1a4adb08770a
Parents: 65a80a0 3862ada
Author: Cam McKenzie <ca...@apache.org>
Authored: Mon Oct 26 07:46:57 2015 +1100
Committer: Cam McKenzie <ca...@apache.org>
Committed: Mon Oct 26 07:46:57 2015 +1100

----------------------------------------------------------------------
 .../curator/framework/EnsureContainers.java     | 64 +++++++++++++++++
 .../framework/imps/TestEnsureContainers.java    | 73 ++++++++++++++++++++
 .../recipes/cache/PathChildrenCache.java        | 13 ++--
 .../recipes/queue/SimpleDistributedQueue.java   | 13 ++--
 4 files changed, 153 insertions(+), 10 deletions(-)
----------------------------------------------------------------------



[07/10] curator git commit: Moved findAndDeleteProtectedNodeInBackground code into separate operation that is processed through the standard Curator background code. This way, retries are applied (with sleep), etc. In the previous implementation, errors

Posted by ra...@apache.org.
Moved findAndDeleteProtectedNodeInBackground code into separate operation that is processed through the standard Curator background
code. This way, retries are applied (with sleep), etc. In the previous implementation, errors caused the background check to be run immediately and infinitely.


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

Branch: refs/heads/CURATOR-3.0
Commit: 9b68e19a278e025fa5884445a2b2519463b57445
Parents: 31c0465
Author: randgalt <ra...@apache.org>
Authored: Mon Dec 28 10:08:51 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Mon Dec 28 10:08:51 2015 -0500

----------------------------------------------------------------------
 .../framework/imps/CreateBuilderImpl.java       |  68 +-----------
 .../FindAndDeleteProtectedNodeInBackground.java | 107 +++++++++++++++++++
 .../framework/imps/TestFrameworkEdges.java      |   1 +
 .../recipes/queue/DistributedQueue.java         |   5 +-
 4 files changed, 116 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/9b68e19a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
index b72b7b6..a9cb600 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
@@ -24,7 +24,6 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import org.apache.curator.RetryLoop;
 import org.apache.curator.TimeTrace;
-import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.api.*;
 import org.apache.curator.framework.api.transaction.CuratorTransactionBridge;
 import org.apache.curator.framework.api.transaction.OperationType;
@@ -464,13 +463,13 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt
         }
         else
         {
-            String path = protectedPathInForeground(givenPath, adjustedPath, data);
+            String path = protectedPathInForeground(adjustedPath, data);
             returnPath = client.unfixForNamespace(path);
         }
         return returnPath;
     }
 
-    private String protectedPathInForeground(String givenPath, String adjustedPath, byte[] data) throws Exception
+    private String protectedPathInForeground(String adjustedPath, byte[] data) throws Exception
     {
         try
         {
@@ -485,8 +484,7 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt
                  * CURATOR-45 + CURATOR-79: we don't know if the create operation was successful or not,
                  * register the znode to be sure it is deleted later.
                  */
-                String localProtectedId = protectedId;
-                findAndDeleteProtectedNodeInBackground(givenPath, localProtectedId, null);
+                new FindAndDeleteProtectedNodeInBackground(client, ZKPaths.getPathAndNode(adjustedPath).getPath(), protectedId).execute();
                 /*
                 * The current UUID is scheduled to be deleted, it is not safe to use it again.
                 * If this builder is used again later create a new UUID
@@ -635,7 +633,7 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt
                     if ( doProtected )
                     {
                         // all retries have failed, findProtectedNodeInForeground(..) included, schedule a clean up
-                        findAndDeleteProtectedNodeInBackground(givenPath, protectedId, null);
+                        new FindAndDeleteProtectedNodeInBackground(client, ZKPaths.getPathAndNode(path).getPath(), protectedId).execute();
                         // assign a new id if this builder is used again later
                         protectedId = UUID.randomUUID().toString();
                     }
@@ -793,62 +791,6 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt
     }
 
     /**
-     * Attempt to delete a protected znode
-     *
-     * @param unAdjustedPath the path - raw without namespace resolution
-     * @param protectedId    the protected id
-     * @param callback       callback to use, <code>null</code> to create a new one
-     */
-    private void findAndDeleteProtectedNodeInBackground(String unAdjustedPath, String protectedId, FindProtectedNodeCB callback)
-    {
-        if ( client.getState() == CuratorFrameworkState.STARTED )
-        {
-            if ( callback == null )
-            {
-                callback = new FindProtectedNodeCB(unAdjustedPath, protectedId);
-            }
-            try
-            {
-                client.getChildren().inBackground(callback).forPath(ZKPaths.getPathAndNode(unAdjustedPath).getPath());
-            }
-            catch ( Exception e )
-            {
-                findAndDeleteProtectedNodeInBackground(unAdjustedPath, protectedId, callback);
-            }
-        }
-    }
-
-    private class FindProtectedNodeCB implements BackgroundCallback
-    {
-        final String path;
-        final String protectedId;
-
-        private FindProtectedNodeCB(String path, String protectedId)
-        {
-            this.path = path;
-            this.protectedId = protectedId;
-        }
-
-        @Override
-        public void processResult(CuratorFramework ignoreClient, CuratorEvent event) throws Exception
-        {
-            if ( event.getResultCode() == KeeperException.Code.OK.intValue() )
-            {
-                final String node = findNode(event.getChildren(), ZKPaths.getPathAndNode(path).getPath(), protectedId);
-                if ( node != null )
-                {
-                    client.delete().guaranteed().inBackground().forPath(node);
-                }
-            }
-            else if ( event.getResultCode() == KeeperException.Code.CONNECTIONLOSS.intValue() )
-            {
-                // retry
-                findAndDeleteProtectedNodeInBackground(path, protectedId, this);
-            }
-        }
-    }
-
-    /**
      * Attempt to find the znode that matches the given path and protected id
      *
      * @param children    a list of candidates znodes
@@ -856,7 +798,7 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt
      * @param protectedId the protected id
      * @return the absolute path of the znode or <code>null</code> if it is not found
      */
-    private static String findNode(final List<String> children, final String path, final String protectedId)
+    static String findNode(final List<String> children, final String path, final String protectedId)
     {
         final String protectedPrefix = getProtectedPrefix(protectedId);
         String foundNode = Iterables.find

http://git-wip-us.apache.org/repos/asf/curator/blob/9b68e19a/curator-framework/src/main/java/org/apache/curator/framework/imps/FindAndDeleteProtectedNodeInBackground.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/FindAndDeleteProtectedNodeInBackground.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/FindAndDeleteProtectedNodeInBackground.java
new file mode 100644
index 0000000..7b5073b
--- /dev/null
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/FindAndDeleteProtectedNodeInBackground.java
@@ -0,0 +1,107 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.imps;
+
+import com.google.common.annotations.VisibleForTesting;
+import org.apache.curator.TimeTrace;
+import org.apache.curator.framework.api.CuratorEventType;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.AsyncCallback;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+class FindAndDeleteProtectedNodeInBackground implements BackgroundOperation<Void>
+{
+    private final Logger log = LoggerFactory.getLogger(getClass());
+    private final CuratorFrameworkImpl client;
+    private final String namespaceAdjustedParentPath;
+    private final String protectedId;
+
+    FindAndDeleteProtectedNodeInBackground(CuratorFrameworkImpl client, String namespaceAdjustedParentPath, String protectedId)
+    {
+        this.client = client;
+        this.namespaceAdjustedParentPath = namespaceAdjustedParentPath;
+        this.protectedId = protectedId;
+    }
+
+    void execute()
+    {
+        OperationAndData.ErrorCallback<Void> errorCallback = new OperationAndData.ErrorCallback<Void>()
+        {
+            @Override
+            public void retriesExhausted(OperationAndData<Void> operationAndData)
+            {
+                client.processBackgroundOperation(operationAndData, null);
+            }
+        };
+        OperationAndData<Void> operationAndData = new OperationAndData<Void>(this, null, null, errorCallback, null);
+        client.processBackgroundOperation(operationAndData, null);
+    }
+
+    @VisibleForTesting
+    static final AtomicBoolean debugInsertError = new AtomicBoolean(false);
+
+    @Override
+    public void performBackgroundOperation(final OperationAndData<Void> operationAndData) throws Exception
+    {
+        final TimeTrace trace = client.getZookeeperClient().startTracer("FindAndDeleteProtectedNodeInBackground");
+        AsyncCallback.Children2Callback callback = new AsyncCallback.Children2Callback()
+        {
+            @Override
+            public void processResult(int rc, String path, Object o, List<String> strings, Stat stat)
+            {
+                trace.commit();
+
+                if ( debugInsertError.compareAndSet(true, false) )
+                {
+                    rc = KeeperException.Code.CONNECTIONLOSS.intValue();
+                }
+
+                if ( rc == KeeperException.Code.OK.intValue() )
+                {
+                    final String node = CreateBuilderImpl.findNode(strings, "/", protectedId);  // due to namespacing, don't let CreateBuilderImpl.findNode adjust the path
+                    if ( node != null )
+                    {
+                        try
+                        {
+                            String deletePath = client.unfixForNamespace(ZKPaths.makePath(namespaceAdjustedParentPath, node));
+                            client.delete().guaranteed().inBackground().forPath(deletePath);
+                        }
+                        catch ( Exception e )
+                        {
+                            log.error("Could not start guaranteed delete for node: " + node);
+                            rc = KeeperException.Code.CONNECTIONLOSS.intValue();
+                        }
+                    }
+                }
+
+                if ( rc != KeeperException.Code.OK.intValue() )
+                {
+                    CuratorEventImpl event = new CuratorEventImpl(client, CuratorEventType.CHILDREN, rc, path, null, o, stat, null, strings, null, null);
+                    client.processBackgroundOperation(operationAndData, event);
+                }
+            }
+        };
+        client.getZooKeeper().getChildren(namespaceAdjustedParentPath, false, callback, null);
+    }
+}

http://git-wip-us.apache.org/repos/asf/curator/blob/9b68e19a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
index 95c3792..cefc1e7 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
@@ -72,6 +72,7 @@ public class TestFrameworkEdges extends BaseClassForTests
 
                 CreateBuilderImpl createBuilder = (CreateBuilderImpl)localClient.create();
                 createBuilder.failNextCreateForTesting = true;
+                FindAndDeleteProtectedNodeInBackground.debugInsertError.set(true);
                 try
                 {
                     createBuilder.withProtection().forPath("/parent/test");

http://git-wip-us.apache.org/repos/asf/curator/blob/9b68e19a/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 3b63956..3100fde 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,6 +583,7 @@ 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() )
@@ -602,7 +603,6 @@ public class DistributedQueue<T> implements QueueBase<T>
             {
                 if ( refreshOnWatch && (currentVersion != childrenCache.getData().version) )
                 {
-                    processedLatch.release(children.size());
                     break;
                 }
             }
@@ -642,9 +642,10 @@ public class DistributedQueue<T> implements QueueBase<T>
                     }
                 }
             );
+            ++submittedQty;
         }
 
-        processedLatch.acquire(children.size());
+        processedLatch.acquire(submittedQty);
     }
 
     private enum ProcessMessageBytesCode


[10/10] curator git commit: Merge branch 'master' into CURATOR-3.0

Posted by ra...@apache.org.
Merge branch 'master' into CURATOR-3.0


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

Branch: refs/heads/CURATOR-3.0
Commit: 100dd3f263c2e1f5e80cdce7e8f91fe1554c8e04
Parents: 5c34cb1 45332f3
Author: randgalt <ra...@apache.org>
Authored: Sun Jan 10 19:30:39 2016 -0500
Committer: randgalt <ra...@apache.org>
Committed: Sun Jan 10 19:30:39 2016 -0500

----------------------------------------------------------------------
 .../framework/imps/CreateBuilderImpl.java       |  68 +-----------
 .../framework/imps/CuratorFrameworkImpl.java    |   5 +-
 .../FindAndDeleteProtectedNodeInBackground.java | 107 +++++++++++++++++++
 .../framework/imps/TestFrameworkEdges.java      |   1 +
 4 files changed, 117 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/100dd3f2/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
----------------------------------------------------------------------
diff --cc curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
index 8a8787a,a9cb600..5622508
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
@@@ -24,8 -24,8 +24,7 @@@ import com.google.common.base.Predicate
  import com.google.common.collect.Iterables;
  import org.apache.curator.RetryLoop;
  import org.apache.curator.TimeTrace;
- import org.apache.curator.framework.CuratorFramework;
  import org.apache.curator.framework.api.*;
 -import org.apache.curator.framework.api.transaction.CuratorTransactionBridge;
  import org.apache.curator.framework.api.transaction.OperationType;
  import org.apache.curator.framework.api.transaction.TransactionCreateBuilder;
  import org.apache.curator.utils.ZKPaths;

http://git-wip-us.apache.org/repos/asf/curator/blob/100dd3f2/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/curator/blob/100dd3f2/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
----------------------------------------------------------------------


[06/10] curator git commit: Back to 2.9.1-SNAPSHOT

Posted by ra...@apache.org.
Back to 2.9.1-SNAPSHOT


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

Branch: refs/heads/CURATOR-3.0
Commit: 31c04658c85a687f66db6327c9e8aca250062627
Parents: e4b8982
Author: Cam McKenzie <ca...@apache.org>
Authored: Mon Oct 26 12:54:02 2015 +1100
Committer: Cam McKenzie <ca...@apache.org>
Committed: Mon Oct 26 12:54:02 2015 +1100

----------------------------------------------------------------------
 curator-client/pom.xml             | 4 ++--
 curator-examples/pom.xml           | 2 +-
 curator-framework/pom.xml          | 4 ++--
 curator-recipes/pom.xml            | 4 ++--
 curator-test/pom.xml               | 4 ++--
 curator-x-discovery-server/pom.xml | 4 ++--
 curator-x-discovery/pom.xml        | 4 ++--
 curator-x-rpc/pom.xml              | 4 ++--
 pom.xml                            | 2 +-
 9 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/31c04658/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index 949712c..9a12344 100644
--- a/curator-client/pom.xml
+++ b/curator-client/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-client</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Client</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/31c04658/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index e1a9e7c..67505ad 100644
--- a/curator-examples/pom.xml
+++ b/curator-examples/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-examples</artifactId>

http://git-wip-us.apache.org/repos/asf/curator/blob/31c04658/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index c63f90f..3dbbdbb 100644
--- a/curator-framework/pom.xml
+++ b/curator-framework/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-framework</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Framework</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/31c04658/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index 029b385..bbcb749 100644
--- a/curator-recipes/pom.xml
+++ b/curator-recipes/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-recipes</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Recipes</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/31c04658/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index 472a083..2f5455d 100644
--- a/curator-test/pom.xml
+++ b/curator-test/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-test</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.1-SNAPSHOT</version>
 
     <name>Curator Testing</name>
     <description>Unit testing utilities.</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/31c04658/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index 14c1111..da80059 100644
--- a/curator-x-discovery-server/pom.xml
+++ b/curator-x-discovery-server/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-x-discovery-server</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery Server</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/31c04658/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index 291c18b..bcb896f 100644
--- a/curator-x-discovery/pom.xml
+++ b/curator-x-discovery/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-x-discovery</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/31c04658/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index 5b51902..2b16996 100644
--- a/curator-x-rpc/pom.xml
+++ b/curator-x-rpc/pom.xml
@@ -22,12 +22,12 @@
     <parent>
         <artifactId>apache-curator</artifactId>
         <groupId>org.apache.curator</groupId>
-        <version>2.9.2-SNAPSHOT</version>
+        <version>2.9.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>curator-x-rpc</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.1-SNAPSHOT</version>
 
     <name>Curator RPC Proxy</name>
     <description>A proxy that bridges non-java environments with the Curator framework and recipes</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/31c04658/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index be3f240..c13a8b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
     <groupId>org.apache.curator</groupId>
     <artifactId>apache-curator</artifactId>
-    <version>2.9.2-SNAPSHOT</version>
+    <version>2.9.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>Apache Curator</name>


[08/10] curator git commit: Don't queue background operation if the client is closed

Posted by ra...@apache.org.
Don't queue background operation if the client is closed


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

Branch: refs/heads/CURATOR-3.0
Commit: 8dff2d7cf69f21fdc42e31fb33feed990915fcc7
Parents: 9b68e19
Author: randgalt <ra...@apache.org>
Authored: Mon Dec 28 10:11:55 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Mon Dec 28 10:11:55 2015 -0500

----------------------------------------------------------------------
 .../org/apache/curator/framework/imps/CuratorFrameworkImpl.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/8dff2d7c/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
index 38ce166..9c017d0 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
@@ -533,7 +533,10 @@ public class CuratorFrameworkImpl implements CuratorFramework
 
     <DATA_TYPE> void queueOperation(OperationAndData<DATA_TYPE> operationAndData)
     {
-        backgroundOperations.offer(operationAndData);
+        if ( getState() == CuratorFrameworkState.STARTED )
+        {
+            backgroundOperations.offer(operationAndData);
+        }
     }
 
     void logError(String reason, final Throwable e)


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

Posted by ra...@apache.org.
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/CURATOR-3.0
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


[02/10] curator git commit: [maven-release-plugin] prepare for next development iteration

Posted by ra...@apache.org.
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/CURATOR-3.0
Commit: 65a80a079815bb753be8950690f14d7cb0b0c83e
Parents: 722bbc4
Author: Cam McKenzie <ca...@apache.org>
Authored: Wed Oct 21 10:59:50 2015 +1100
Committer: Cam McKenzie <ca...@apache.org>
Committed: Wed Oct 21 10:59:50 2015 +1100

----------------------------------------------------------------------
 curator-client/pom.xml             | 4 ++--
 curator-examples/pom.xml           | 2 +-
 curator-framework/pom.xml          | 4 ++--
 curator-recipes/pom.xml            | 4 ++--
 curator-test/pom.xml               | 4 ++--
 curator-x-discovery-server/pom.xml | 4 ++--
 curator-x-discovery/pom.xml        | 4 ++--
 curator-x-rpc/pom.xml              | 4 ++--
 pom.xml                            | 4 ++--
 9 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/65a80a07/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index e23d60a..949712c 100644
--- a/curator-client/pom.xml
+++ b/curator-client/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-client</artifactId>
-    <version>2.9.1</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Client</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/65a80a07/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index 9c5cd31..e1a9e7c 100644
--- a/curator-examples/pom.xml
+++ b/curator-examples/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-examples</artifactId>

http://git-wip-us.apache.org/repos/asf/curator/blob/65a80a07/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index 4e2da1c..c63f90f 100644
--- a/curator-framework/pom.xml
+++ b/curator-framework/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-framework</artifactId>
-    <version>2.9.1</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Framework</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/65a80a07/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index d3e9851..029b385 100644
--- a/curator-recipes/pom.xml
+++ b/curator-recipes/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-recipes</artifactId>
-    <version>2.9.1</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Recipes</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/65a80a07/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index 4e2d68d..472a083 100644
--- a/curator-test/pom.xml
+++ b/curator-test/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-test</artifactId>
-    <version>2.9.1</version>
+    <version>2.9.2-SNAPSHOT</version>
 
     <name>Curator Testing</name>
     <description>Unit testing utilities.</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/65a80a07/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index 1879826..14c1111 100644
--- a/curator-x-discovery-server/pom.xml
+++ b/curator-x-discovery-server/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-x-discovery-server</artifactId>
-    <version>2.9.1</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery Server</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/65a80a07/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index df36979..291c18b 100644
--- a/curator-x-discovery/pom.xml
+++ b/curator-x-discovery/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.1</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-x-discovery</artifactId>
-    <version>2.9.1</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/65a80a07/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index 74f1251..5b51902 100644
--- a/curator-x-rpc/pom.xml
+++ b/curator-x-rpc/pom.xml
@@ -22,12 +22,12 @@
     <parent>
         <artifactId>apache-curator</artifactId>
         <groupId>org.apache.curator</groupId>
-        <version>2.9.1</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>curator-x-rpc</artifactId>
-    <version>2.9.1</version>
+    <version>2.9.2-SNAPSHOT</version>
 
     <name>Curator RPC Proxy</name>
     <description>A proxy that bridges non-java environments with the Curator framework and recipes</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/65a80a07/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3e0844a..be3f240 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
     <groupId>org.apache.curator</groupId>
     <artifactId>apache-curator</artifactId>
-    <version>2.9.1</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>Apache Curator</name>
@@ -98,7 +98,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git
         </developerConnection>
-        <tag>apache-curator-2.9.1-SNAPSHOT</tag>
+        <tag>apache-curator-2.8.0</tag>
     </scm>
 
     <issueManagement>


[05/10] curator git commit: [maven-release-plugin] prepare for next development iteration

Posted by ra...@apache.org.
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/CURATOR-3.0
Commit: e4b8982d8bc6d7701d33d9de166aaa9b0c910615
Parents: 95f5515
Author: Cam McKenzie <ca...@apache.org>
Authored: Mon Oct 26 11:05:40 2015 +1100
Committer: Cam McKenzie <ca...@apache.org>
Committed: Mon Oct 26 11:05:40 2015 +1100

----------------------------------------------------------------------
 curator-client/pom.xml             | 4 ++--
 curator-examples/pom.xml           | 2 +-
 curator-framework/pom.xml          | 4 ++--
 curator-recipes/pom.xml            | 4 ++--
 curator-test/pom.xml               | 4 ++--
 curator-x-discovery-server/pom.xml | 4 ++--
 curator-x-discovery/pom.xml        | 4 ++--
 curator-x-rpc/pom.xml              | 4 ++--
 pom.xml                            | 4 ++--
 9 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/e4b8982d/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index 6eb4428..949712c 100644
--- a/curator-client/pom.xml
+++ b/curator-client/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-client</artifactId>
-    <version>2.9.2</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Client</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/e4b8982d/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index 8dce22b..e1a9e7c 100644
--- a/curator-examples/pom.xml
+++ b/curator-examples/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-examples</artifactId>

http://git-wip-us.apache.org/repos/asf/curator/blob/e4b8982d/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index 6a05d84..c63f90f 100644
--- a/curator-framework/pom.xml
+++ b/curator-framework/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-framework</artifactId>
-    <version>2.9.2</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Framework</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/e4b8982d/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index f281364..029b385 100644
--- a/curator-recipes/pom.xml
+++ b/curator-recipes/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-recipes</artifactId>
-    <version>2.9.2</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Recipes</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/e4b8982d/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index 61cc672..472a083 100644
--- a/curator-test/pom.xml
+++ b/curator-test/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-test</artifactId>
-    <version>2.9.2</version>
+    <version>2.9.2-SNAPSHOT</version>
 
     <name>Curator Testing</name>
     <description>Unit testing utilities.</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/e4b8982d/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index 9343cf2..14c1111 100644
--- a/curator-x-discovery-server/pom.xml
+++ b/curator-x-discovery-server/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-x-discovery-server</artifactId>
-    <version>2.9.2</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery Server</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/e4b8982d/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index d367db7..291c18b 100644
--- a/curator-x-discovery/pom.xml
+++ b/curator-x-discovery/pom.xml
@@ -24,11 +24,11 @@
     <parent>
         <groupId>org.apache.curator</groupId>
         <artifactId>apache-curator</artifactId>
-        <version>2.9.2</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>curator-x-discovery</artifactId>
-    <version>2.9.2</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Curator Service Discovery</name>

http://git-wip-us.apache.org/repos/asf/curator/blob/e4b8982d/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index ac7e4cf..5b51902 100644
--- a/curator-x-rpc/pom.xml
+++ b/curator-x-rpc/pom.xml
@@ -22,12 +22,12 @@
     <parent>
         <artifactId>apache-curator</artifactId>
         <groupId>org.apache.curator</groupId>
-        <version>2.9.2</version>
+        <version>2.9.2-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>curator-x-rpc</artifactId>
-    <version>2.9.2</version>
+    <version>2.9.2-SNAPSHOT</version>
 
     <name>Curator RPC Proxy</name>
     <description>A proxy that bridges non-java environments with the Curator framework and recipes</description>

http://git-wip-us.apache.org/repos/asf/curator/blob/e4b8982d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9a4a546..be3f240 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
     <groupId>org.apache.curator</groupId>
     <artifactId>apache-curator</artifactId>
-    <version>2.9.2</version>
+    <version>2.9.2-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>Apache Curator</name>
@@ -98,7 +98,7 @@
         <connection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git
         </developerConnection>
-        <tag>apache-curator-2.9.1</tag>
+        <tag>apache-curator-2.8.0</tag>
     </scm>
 
     <issueManagement>