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


##########
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/ServiceLock.java:
##########
@@ -825,13 +825,24 @@ public static void deleteLock(ZooReaderWriter zk, 
ServiceLockPath path)
   public static void deleteLock(ZooReaderWriter zoo, String path,
       ServerServices.Service serviceType, Predicate<HostAndPort> 
hostPortPredicate,
       Consumer<String> messageOutput, Boolean dryRun) throws KeeperException, 
InterruptedException {
+
+    Objects.requireNonNull(path, "Lock path cannot be null");
+    Objects.requireNonNull(hostPortPredicate, "host predicate cannot be null");
+
+    if (!zoo.exists(path)) {
+      throw new IllegalStateException("Path " + path + " does not exist");
+    }

Review Comment:
   The null checks seems fine.  Was asking about the exist check because it was 
wondering if it was an extra RPC



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