This is an automated email from the ASF dual-hosted git repository. reschke pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push: new 0b0ab68d3f OAK-11389: added throttler to throttle the document store based on external factor set inside settings collection - sonar complaints (#2431) 0b0ab68d3f is described below commit 0b0ab68d3fb8032ef0964202903c991eb7404227 Author: Julian Reschke <resc...@apache.org> AuthorDate: Wed Aug 6 10:27:18 2025 +0200 OAK-11389: added throttler to throttle the document store based on external factor set inside settings collection - sonar complaints (#2431) --- .../document/mongo/MongoDocumentStoreThrottlingFactorUpdater.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStoreThrottlingFactorUpdater.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStoreThrottlingFactorUpdater.java index 4d13c61394..049d12d08e 100644 --- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStoreThrottlingFactorUpdater.java +++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStoreThrottlingFactorUpdater.java @@ -48,7 +48,7 @@ public class MongoDocumentStoreThrottlingFactorUpdater implements Closeable { private static final String TS_TIME = "ts"; public static final String SIZE = "size"; private final ScheduledExecutorService throttlingFactorExecutor; - private final AtomicReference<Integer> factor; + private final AtomicReference<Integer> factorRef; private final MongoDatabase localDb; private final int period; @@ -56,13 +56,13 @@ public class MongoDocumentStoreThrottlingFactorUpdater implements Closeable { final @NotNull AtomicReference<Integer> factor, int period) { this.throttlingFactorExecutor = Executors.newSingleThreadScheduledExecutor(); - this.factor = factor; + this.factorRef = factor; this.localDb = localDb; this.period = period; } public void scheduleFactorUpdates() { - throttlingFactorExecutor.scheduleAtFixedRate(() -> factor.set(updateFactor()), 10, period, SECONDS); + throttlingFactorExecutor.scheduleAtFixedRate(() -> factorRef.set(updateFactor()), 10, period, SECONDS); } // visible for testing only