dlmarion commented on code in PR #5344:
URL: https://github.com/apache/accumulo/pull/5344#discussion_r1964348700
##########
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 don't know that a lock would help here. We know that it's an old path in
ZooKeeper and that it's empty, so we are going to delete it. If another process
for some reason is going to try and use it, we don't want that process up
anyway, so deleting the server directory would delete any lock that is acquired
after we determined the directory was empty, and deleting the lock would
terminate the process.
--
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]