This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push:
new c192a8bd95 Return early from ServiceLock.deleteLocks when no servers
(#6192)
c192a8bd95 is described below
commit c192a8bd95d6fddcad868337d6c3fbfbf7b9959c
Author: Dave Marion <[email protected]>
AuthorDate: Tue Mar 10 12:53:55 2026 -0400
Return early from ServiceLock.deleteLocks when no servers (#6192)
Prior version threw an IllegalStateException when there
were no servers. This change just returns from the method
early without throwing an exception.
---
.../java/org/apache/accumulo/core/fate/zookeeper/ServiceLock.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/ServiceLock.java
b/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/ServiceLock.java
index e52de4a036..14af3daa25 100644
---
a/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/ServiceLock.java
+++
b/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/ServiceLock.java
@@ -796,7 +796,7 @@ public class ServiceLock implements Watcher {
List<String> servers = zk.getChildren(zPath);
if (servers.isEmpty()) {
- throw new IllegalStateException("No server locks are held at " + zPath);
+ return;
}
for (String server : servers) {
@@ -822,7 +822,7 @@ public class ServiceLock implements Watcher {
List<String> servers = zk.getChildren(zPath);
if (servers.isEmpty()) {
- throw new IllegalStateException("No server locks are held at " + zPath);
+ return;
}
ZooKeeper z = zk.getZooKeeper();