This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 836f0ec928 fixes NPE in ServiceLockPaths (#5778)
836f0ec928 is described below
commit 836f0ec92825eb4390a8af2c264a9852c89d0040
Author: Keith Turner <[email protected]>
AuthorDate: Wed Aug 6 10:35:03 2025 -0400
fixes NPE in ServiceLockPaths (#5778)
UserFateOpsCommandsIT was failing because of the following error in the
Manager. Modified ServiceLockPaths to avoid the NPE.
```
Critical thread CompactionCoordinator Thread died
java.lang.NullPointerException
at
org.apache.accumulo.core.lock.ServiceLockPaths.get(ServiceLockPaths.java:456)
at
org.apache.accumulo.core.lock.ServiceLockPaths.getCompactor(ServiceLockPaths.java:290)
at
org.apache.accumulo.core.util.compaction.ExternalCompactionUtil.getCompactionsRunningOnCompactors(ExternalCompactionUtil.java:206)
at
org.apache.accumulo.manager.compaction.coordinator.CompactionCoordinator.getCompactionsRunningOnCompactors(CompactionCoordinator.java:1212)
at
org.apache.accumulo.manager.compaction.coordinator.CompactionCoordinator.run(CompactionCoordinator.java:409)
at
org.apache.accumulo.core.util.threads.Threads.lambda$createCriticalThread$0(Threads.java:76)
at
org.apache.accumulo.core.trace.TraceWrappedRunnable.run(TraceWrappedRunnable.java:52)
at java.base/java.lang.Thread.run(Thread.java:829)
```
---
.../main/java/org/apache/accumulo/core/lock/ServiceLockPaths.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockPaths.java
b/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockPaths.java
index 729fb03af3..ab266636fd 100644
--- a/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockPaths.java
+++ b/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockPaths.java
@@ -447,7 +447,13 @@ public class ServiceLockPaths {
}
addressPredicate = s -> true;
} else {
- servers = zooCache.getChildren(typePath + "/" + group);
+ var children = zooCache.getChildren(typePath + "/" + group);
+ if (children == null) {
+ // resource group no longer exist
+ servers = List.of();
+ } else {
+ servers = children;
+ }
addressPredicate = addressSelector.getPredicate();
}