pkuwm commented on a change in pull request #838: Make ConfigAccessor and 
ZkUtil realm-aware
URL: https://github.com/apache/helix/pull/838#discussion_r386718561
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZKUtil.java
 ##########
 @@ -92,15 +97,17 @@ public static boolean isClusterSetup(String clusterName, 
HelixZkClient zkClient)
     requiredPaths.add(PropertyPathBuilder.controllerHistory(clusterName));
     boolean isValid = true;
 
-    BaseDataAccessor<Object> baseAccessor = new 
ZkBaseDataAccessor<Object>(zkClient);
-    boolean[] ret = baseAccessor.exists(requiredPaths, 0);
+    boolean[] ret = new boolean[requiredPaths.size()];
+    for (int i = 0; i < requiredPaths.size(); i++) {
+      ret[i] = zkClient.exists(requiredPaths.get(i));
 
 Review comment:
   I did that is why I know this is an async. If you do this sync, it changes 
the original behavior. If one call of exists fails and throw exception this 
call fails. But the original behavior won’t fail all the calls. Some other 
calls are still possible to succeed. Like you said this is just a realm aware 
change, I don’t think it is a good idea to change the behavior.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to