keith-turner commented on code in PR #6166:
URL: https://github.com/apache/accumulo/pull/6166#discussion_r2885468031


##########
server/base/src/main/java/org/apache/accumulo/server/util/Admin.java:
##########
@@ -589,20 +590,28 @@ private static void stopServers(final ServerContext 
context, List<String> server
         var iid = context.getInstanceID();
 
         String tserversPath = Constants.ZROOT + "/" + iid + 
Constants.ZTSERVERS;
-        ZooZap.removeLocks(zk, tserversPath, hostAndPort::contains, opts);
+        ServiceLock.deleteLocks(zk, tserversPath, hostAndPort::contains, 
log::debug, false);

Review Comment:
   This could also log at trace if it would cause the cluster script to print a 
bunch of stuff.



##########
server/base/src/main/java/org/apache/accumulo/server/util/Admin.java:
##########
@@ -589,20 +590,28 @@ private static void stopServers(final ServerContext 
context, List<String> server
         var iid = context.getInstanceID();
 
         String tserversPath = Constants.ZROOT + "/" + iid + 
Constants.ZTSERVERS;
-        ZooZap.removeLocks(zk, tserversPath, hostAndPort::contains, opts);
+        ServiceLock.deleteLocks(zk, tserversPath, hostAndPort::contains, 
log::debug, false);
         String compactorsBasepath = Constants.ZROOT + "/" + iid + 
Constants.ZCOMPACTORS;
         ZooZap.removeCompactorGroupedLocks(zk, compactorsBasepath, rg -> true,
             hostAndPort::contains, opts);
         String sserversPath = Constants.ZROOT + "/" + iid + 
Constants.ZSSERVERS;
-        ZooZap.removeScanServerGroupLocks(zk, sserversPath, 
hostAndPort::contains, rg -> true,
-            opts);
+        try {
+          ZooZap.removeScanServerGroupLocks(zk, sserversPath, 
hostAndPort::contains, rg -> true,
+              opts);
+        } catch (IllegalStateException e) {
+          log.debug("No Scan Server locks currently exist", e);
+        }
 
         String managerLockPath = Constants.ZROOT + "/" + iid + 
Constants.ZMANAGER_LOCK;
         ZooZap.removeSingletonLock(zk, managerLockPath, hostAndPort::contains, 
opts);
         String gcLockPath = Constants.ZROOT + "/" + iid + Constants.ZGC_LOCK;
-        ZooZap.removeSingletonLock(zk, gcLockPath, hostAndPort::contains, 
opts);
+        ServiceLock.deleteLock(zk, gcLockPath, 
ServerServices.Service.GC_CLIENT,
+            hostAndPort::contains, log::debug, opts.dryRun);

Review Comment:
   Would this cause a accumulo cluster script to print stuff when it did not 
before?  If so, maybe this could log at trace.



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