accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/3] accumulo git commit: ACCUMULO-4401 Restore original conditional to avoid infinite loop
Date Sun, 14 Aug 2016 01:45:55 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.8 93e188f62 -> cda493bd5
  refs/heads/master c4afeffa3 -> 434a88a3e


ACCUMULO-4401 Restore original conditional to avoid infinite loop


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

Branch: refs/heads/1.8
Commit: cda493bd5636cd7523f4e0168f1174431a837007
Parents: 93e188f
Author: Josh Elser <elserj@apache.org>
Authored: Sat Aug 13 21:06:48 2016 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sat Aug 13 21:45:41 2016 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/server/init/Initialize.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/cda493bd/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index 0ccf51f..d92392f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -575,8 +575,8 @@ public class Initialize implements KeywordExecutable {
       if (opts.clearInstanceName) {
         exists = false;
         break;
-      } else if (zoo.exists(instanceNamePath)) {
-        exists = true;
+        // ACCUMULO-4401 setting exists=false is just as important as setting it to true
+      } else if (exists = zoo.exists(instanceNamePath)) {
         String decision = getConsoleReader().readLine("Instance name \"" + instanceName +
"\" exists. Delete existing entry from zookeeper? [Y/N] : ");
         if (decision == null)
           System.exit(0);


Mime
View raw message