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


##########
server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java:
##########
@@ -181,6 +190,9 @@ public void startServiceLockVerificationThread() {
             }
           });
       verificationThread.start();
+    } else {
+      log.debug(

Review Comment:
   Could make this info as it will only run once  also the prop name would be 
useful, like `"+GENERAL_SERVER_LOCK_VERIFICATION_INTERVAL.getKey(+")`



##########
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/ServiceLock.java:
##########
@@ -762,4 +762,27 @@ public static boolean deleteLock(ZooReaderWriter zk, 
ServiceLockPath path, Strin
 
     return false;
   }
+
+  /**
+   * Checks that the lock still exists in ZooKeeper. The typical mechanism for 
determining if a lock
+   * is lost depends on a Watcher set on the lock node. There exists a case 
where the Watcher may
+   * not get called if another Watcher is stuck waiting on I/O or otherwise 
hung. In the case where
+   * this method returns false, then the typical action is to exit the server 
process.
+   *
+   * @return true if lock path still exists, false otherwise and on error
+   */
+  public boolean verifyLockAtSource() {
+    final String lockPath = getLockPath();
+    if (lockPath == null) {
+      // lock not set yet

Review Comment:
   ```suggestion
         // lock not set yet or lock was lost
   ```



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