GrantPSpencer commented on code in PR #2994:
URL: https://github.com/apache/helix/pull/2994#discussion_r1913980769


##########
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java:
##########
@@ -274,18 +273,14 @@ public void dropInstance(String clusterName, 
InstanceConfig instanceConfig) {
           "Node " + instanceName + " is still alive for cluster " + 
clusterName + ", can't drop.");
     }
 
-    // delete config path
-    String instanceConfigsPath = 
PropertyPathBuilder.instanceConfig(clusterName);
-    ZKUtil.dropChildren(_zkClient, instanceConfigsPath, 
instanceConfig.getRecord());
-    // delete instance path
-    dropInstancePathRecursively(instancePath, 
instanceConfig.getInstanceName());
+    dropInstancePathsRecursively(instanceName, instancePath, 
instanceConfigPath);

Review Comment:
   Good call out. Changed to take clusterName and instanceName and now 
constructs paths accordingly. There is some redundancy in the string 
construction of paths now, but will prevent possibility of passing instancePath 
of 1 instance and instanceConfigPath of a different instance. 
   
   only zkclient should have general delete with any paths



-- 
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.

To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to