curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [1/2] curator git commit: fixed some merge issues
Date Tue, 12 May 2015 22:14:54 GMT
Repository: curator
Updated Branches:
  refs/heads/CURATOR-3.0 fc45a4ec8 -> 69b5a6581


fixed some merge issues


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

Branch: refs/heads/CURATOR-3.0
Commit: 7497fc9022d74ea4a033ae854899136f2671dc1e
Parents: fc45a4e
Author: randgalt <randgalt@apache.org>
Authored: Tue May 12 17:11:34 2015 -0500
Committer: randgalt <randgalt@apache.org>
Committed: Tue May 12 17:11:34 2015 -0500

----------------------------------------------------------------------
 .../org/apache/curator/framework/imps/CreateBuilderImpl.java   | 6 +++++-
 .../org/apache/curator/framework/imps/TestFrameworkEdges.java  | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/7497fc90/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 28b990d..091ee91 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
@@ -597,6 +597,9 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt
         };
     }
 
+    @VisibleForTesting
+    volatile boolean debugForceFindProtectedNode = false;
+
     private void pathInBackground(final String path, final byte[] data, final String givenPath)
     {
         final AtomicBoolean firstTime = new AtomicBoolean(true);
@@ -620,7 +623,7 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt
             void callPerformBackgroundOperation() throws Exception
             {
                 boolean callSuper = true;
-                boolean localFirstTime = firstTime.getAndSet(false);
+                boolean localFirstTime = firstTime.getAndSet(false) && !debugForceFindProtectedNode;
                 if ( !localFirstTime && doProtected )
                 {
                     String createdPath = null;
@@ -681,6 +684,7 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt
                         String createdPath = null;
                         if ( !localFirstTime && doProtected )
                         {
+                            debugForceFindProtectedNode = false;
                             createdPath = findProtectedNodeInForeground(path);
                         }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/7497fc90/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 cd3ae77..b25f46e 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
@@ -60,6 +60,7 @@ public class TestFrameworkEdges extends BaseClassForTests
     {
         for ( CreateMode mode : CreateMode.values() )
         {
+            System.out.println(mode);
             internalTestPathsFromProtectingInBackground(mode);
         }
     }


Mime
View raw message