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 061b616490 avoids creating lots of site config on startup (#6135)
061b616490 is described below
commit 061b61649014a93181e434c720f68a05083d794f
Author: Keith Turner <[email protected]>
AuthorDate: Wed Feb 18 14:35:32 2026 -0800
avoids creating lots of site config on startup (#6135)
---
.../org/apache/accumulo/server/util/ServerKeywordExecutable.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/util/ServerKeywordExecutable.java
b/server/base/src/main/java/org/apache/accumulo/server/util/ServerKeywordExecutable.java
index 0c406f24e0..04251f250d 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/util/ServerKeywordExecutable.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/util/ServerKeywordExecutable.java
@@ -31,14 +31,17 @@ import com.beust.jcommander.JCommander;
public abstract class ServerKeywordExecutable<OPTS extends ServerOpts>
extends BaseKeywordExecutable<OPTS> {
- private final ServerContext context;
+ private ServerContext context;
public ServerKeywordExecutable(OPTS options) {
super(options);
- context = new ServerContext(SiteConfiguration.auto());
}
- public ServerContext getServerContext() {
+ public synchronized ServerContext getServerContext() {
+ if (context == null) {
+ context = new ServerContext(SiteConfiguration.auto());
+ }
+
if (context.isClosed()) {
throw new IllegalStateException(
"Cannot use context after execute method has completed. Context is
closed.");