keith-turner commented on code in PR #5857:
URL: https://github.com/apache/accumulo/pull/5857#discussion_r2389371127
##########
core/src/main/java/org/apache/accumulo/core/lock/ServiceLockSupport.java:
##########
@@ -138,17 +138,19 @@ public boolean isLockAcquired() {
return acquiredLock;
}
- public boolean isFailedToAcquireLock() {
- return failedToAcquireLock;
+ public boolean cannotRetryLocking() {
+ return acquiredLock && !failedToAcquireLock;
}
}
/**
* Lock Watcher used by non-HA services
*/
- public static class ServiceLockWatcher implements LockWatcher {
+ public static class ServiceLockWatcher implements AccumuloLockWatcher {
+ private final AtomicBoolean lockAcquired = new AtomicBoolean(false);
Review Comment:
Can this atomic boolean be removed?
##########
test/src/main/java/org/apache/accumulo/test/fate/TestLock.java:
##########
@@ -88,6 +89,8 @@ public ServiceLock createTestLock(ServerContext context)
throws InterruptedExcep
return lock;
}
+ private final AtomicBoolean lockAcquired = new AtomicBoolean(false);
Review Comment:
Can this be removed?
##########
server/base/src/main/java/org/apache/accumulo/server/util/Admin.java:
##########
@@ -375,6 +376,8 @@ static class FateOpsCommand extends SubCommandOpts {
List<String> instanceTypes = new ArrayList<>();
}
+ AtomicBoolean lockAcquired = new AtomicBoolean(false);
Review Comment:
Can this be removed?
##########
test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java:
##########
@@ -322,6 +323,7 @@ public static void main(String[] args) throws Exception {
HostAndPort.fromParts(ConfigOpts.BIND_ALL_ADDRESSES, opts.port));
sa.startThriftServer("null tserver");
+ AtomicBoolean acquiredLock = new AtomicBoolean(false);
Review Comment:
Can this be removed?
--
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]