ctubbsii commented on code in PR #5344:
URL: https://github.com/apache/accumulo/pull/5344#discussion_r1964346290


##########
server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java:
##########
@@ -363,8 +364,18 @@ private void 
validateEmptyZKWorkerServerPaths(ServerContext context) {
         List<String> children = zr.getChildren(zkRoot + serverPath);
         for (String child : children) {
           if (child.contains(":")) {
-            throw new IllegalStateException("Found server address at " + 
serverPath + "/" + child
-                + ". Was expecting either a resource group name or nothing. 
Stop any referenced servers.");
+            String childPath = zkRoot + serverPath + "/" + child;
+            if (zr.getChildren(childPath).isEmpty()) {
+              // child is likely host:port and is an empty directory. Since 
there
+              // is no lock here, then the server is likely down (or should 
be).
+              // Remove the entry and move on.
+              
context.getZooSession().asReaderWriter().recursiveDelete(childPath,

Review Comment:
   I guess deleting the lock is probably sufficient... no need to reserve it. I 
was just thinking of the case where a new one tried to come online.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to