dlmarion commented on code in PR #5145:
URL: https://github.com/apache/accumulo/pull/5145#discussion_r1873794840
##########
server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java:
##########
@@ -139,6 +149,41 @@ public String getApplicationName() {
return applicationName;
}
+ /**
+ * Get the ServiceLock for this server process. May return null if called
before the lock is
+ * acquired.
+ *
+ * @return lock ServiceLock or null
+ */
+ public abstract ServiceLock getLock();
+
+ public void startServiceLockVerificationThread() {
+ final long interval =
+
getConfiguration().getTimeInMillis(Property.GENERAL_SERVER_LOCK_VERIFICATION_INTERVAL);
+ if (interval > 0) {
+ verificationThread =
Threads.createThread("service-lock-verification-thread",
+ OptionalInt.of(Thread.NORM_PRIORITY + 1), () -> {
+ while (true && serverThread.isAlive()) {
+ ServiceLock lock = getLock();
+ try {
+ if (lock != null && !lock.verifyLockAtSource()) {
Review Comment:
Added trace logging in 601aff5.
--
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]