This is an automated email from the ASF dual-hosted git repository.
dlmarion 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 58f8e58d52 Fixed NPE in LiveTServerSet (#5758)
58f8e58d52 is described below
commit 58f8e58d52d24bc01eeb7b99e52d836eb2d9a3d9
Author: Dave Marion <[email protected]>
AuthorDate: Thu Jul 24 17:34:46 2025 -0400
Fixed NPE in LiveTServerSet (#5758)
scanServers was being called before the callback object
was set resulting in a NPE.
---
.../main/java/org/apache/accumulo/server/manager/LiveTServerSet.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/manager/LiveTServerSet.java
b/server/base/src/main/java/org/apache/accumulo/server/manager/LiveTServerSet.java
index eea48e07ab..a178f0b44b 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/manager/LiveTServerSet.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/manager/LiveTServerSet.java
@@ -222,13 +222,13 @@ public class LiveTServerSet implements ZooCacheWatcher {
}
public synchronized void startListeningForTabletServerChanges(Listener
cback) {
- scanServers();
Objects.requireNonNull(cback);
if (this.cback.compareAndSet(null, cback)) {
this.context.getZooCache().addZooCacheWatcher(this);
} else if (this.cback.get() != cback) {
throw new IllegalStateException("Attempted to set different cback
object");
}
+ scanServers();
ThreadPools.watchCriticalScheduledTask(this.context.getScheduledExecutor()
.scheduleWithFixedDelay(this::scanServers, 5000, 5000,
TimeUnit.MILLISECONDS));
}