You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2023/01/02 07:07:07 UTC

[jackrabbit-oak] branch 1.22 updated (ac89affe0f -> 6f0449a067)

This is an automated email from the ASF dual-hosted git repository.

reschke pushed a change to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


    from ac89affe0f OAK-9028: upgrade to mockito-core 3.3.3
     new d8d26ab740 OAK-9031: use SystemPropertySupplier in DocumentNodeStore
     new 6f0449a067 OAK-9031: use SystemPropertySupplier in DocumentNodeStore

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../oak/plugins/document/DocumentNodeStore.java    | 34 +++++++++++-----------
 1 file changed, 17 insertions(+), 17 deletions(-)


[jackrabbit-oak] 01/02: OAK-9031: use SystemPropertySupplier in DocumentNodeStore

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit d8d26ab740b6396542d0bdbd553c25f8e11234c6
Author: Julian Reschke <re...@apache.org>
AuthorDate: Fri Apr 24 07:33:47 2020 +0000

    OAK-9031: use SystemPropertySupplier in DocumentNodeStore
    
    git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1876916 13f79535-47bb-0310-9956-ffa450edef68
---
 .../oak/plugins/document/DocumentNodeStore.java    | 35 +++++++++++-----------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
index 1b0d21b1c7..2c99954e60 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
@@ -93,6 +93,7 @@ import org.apache.jackrabbit.oak.plugins.document.bundlor.DocumentBundlor;
 import org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache;
 import org.apache.jackrabbit.oak.plugins.document.persistentCache.broadcast.DynamicBroadcastConfig;
 import org.apache.jackrabbit.oak.plugins.document.util.ReadOnlyDocumentStoreWrapperFactory;
+import org.apache.jackrabbit.oak.plugins.document.util.SystemPropertySupplier;
 import org.apache.jackrabbit.oak.spi.blob.BlobStore;
 import org.apache.jackrabbit.oak.commons.json.JsopStream;
 import org.apache.jackrabbit.oak.commons.json.JsopWriter;
@@ -162,46 +163,47 @@ public final class DocumentNodeStore
     /**
      * Enable fast diff operations.
      */
-    private static final boolean FAST_DIFF = Boolean.parseBoolean(
-            System.getProperty("oak.documentMK.fastDiff", "true"));
+    private static final boolean FAST_DIFF = SystemPropertySupplier.create("oak.documentMK.fastDiff", Boolean.TRUE).loggingTo(LOG)
+            .get();
 
     /**
      * Feature flag to enable concurrent add/remove operations of hidden empty
      * nodes. See OAK-2673.
      */
-    private boolean enableConcurrentAddRemove =
-            Boolean.getBoolean("oak.enableConcurrentAddRemove");
+    private boolean enableConcurrentAddRemove = SystemPropertySupplier.create("oak.enableConcurrentAddRemove", Boolean.FALSE)
+            .loggingTo(LOG).get();
 
     /**
      * Use fair mode for background operation lock.
      */
-    private boolean fairBackgroundOperationLock =
-            Boolean.parseBoolean(System.getProperty("oak.fairBackgroundOperationLock", "true"));
+    private boolean fairBackgroundOperationLock = SystemPropertySupplier.create("oak.fairBackgroundOperationLock", Boolean.TRUE)
+            .loggingTo(LOG).get();
 
     public static final String SYS_PROP_DISABLE_JOURNAL = "oak.disableJournalDiff";
     /**
      * Feature flag to disable the journal diff mechanism. See OAK-4528.
      */
-    private boolean disableJournalDiff =
-            Boolean.getBoolean(SYS_PROP_DISABLE_JOURNAL);
+    private boolean disableJournalDiff = SystemPropertySupplier.create(SYS_PROP_DISABLE_JOURNAL, Boolean.FALSE).loggingTo(LOG)
+            .get();
 
     /**
      * Threshold for number of paths in journal entry to require a force push during commit
      * (instead of at background write)
      */
-    private int journalPushThreshold = Integer.getInteger("oak.journalPushThreshold", 100000);
+    private int journalPushThreshold = SystemPropertySupplier.create("oak.journalPushThreshold", 100000).loggingTo(LOG).get();
 
     /**
      * How many collision entries to collect in a single call.
      */
-    private int collisionGarbageBatchSize = Integer.getInteger("oak.documentMK.collisionGarbageBatchSize", 1000);
+    private int collisionGarbageBatchSize = SystemPropertySupplier.create("oak.documentMK.collisionGarbageBatchSize", 1000)
+            .loggingTo(LOG).get();
 
     /**
      * The number of updates to batch with a single call to
      * {@link DocumentStore#createOrUpdate(Collection, List)}.
      */
-    private final int createOrUpdateBatchSize =
-            Integer.getInteger("oak.documentMK.createOrUpdateBatchSize", 1000);
+    private final int createOrUpdateBatchSize = SystemPropertySupplier.create("oak.documentMK.createOrUpdateBatchSize", 1000)
+            .loggingTo(LOG).get();
 
     public static final String SYS_PROP_DISABLE_SWEEP2 = "oak.documentMK.disableSweep2";
     private boolean disableSweep2 = SystemPropertySupplier.create(SYS_PROP_DISABLE_SWEEP2, Boolean.FALSE).loggingTo(LOG)
@@ -247,12 +249,11 @@ public final class DocumentNodeStore
      * The maximum back off time in milliseconds when merges are retried. The
      * default value is twice the {@link #asyncDelay}.
      */
-    private int maxBackOffMillis =
-            Integer.getInteger("oak.maxBackOffMS", asyncDelay * 2);
+    private int maxBackOffMillis = SystemPropertySupplier.create("oak.maxBackOffMS", asyncDelay * 2).loggingTo(LOG).get();
 
-    private int changeSetMaxItems =  Integer.getInteger("oak.document.changeSet.maxItems", 50);
+    private int changeSetMaxItems = SystemPropertySupplier.create("oak.document.changeSet.maxItems", 50).loggingTo(LOG).get();
 
-    private int changeSetMaxDepth =  Integer.getInteger("oak.document.changeSet.maxDepth", 9);
+    private int changeSetMaxDepth = SystemPropertySupplier.create("oak.document.changeSet.maxDepth", 9).loggingTo(LOG).get();
 
     /**
      * Whether this instance is disposed.
@@ -570,7 +571,7 @@ public final class DocumentNodeStore
         this.clock = builder.getClock();
 
         int cid = builder.getClusterId();
-        cid = Integer.getInteger("oak.documentMK.clusterId", cid);
+        cid = SystemPropertySupplier.create("oak.documentMK.clusterId", cid).loggingTo(LOG).get();
         if (readOnlyMode) {
             clusterNodeInfo = ClusterNodeInfo.getReadOnlyInstance(nonLeaseCheckingStore);
         } else {


[jackrabbit-oak] 02/02: OAK-9031: use SystemPropertySupplier in DocumentNodeStore

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 6f0449a067b91fae29c7821f5d6478c5b300f50a
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Mon Jan 2 08:06:58 2023 +0100

    OAK-9031: use SystemPropertySupplier in DocumentNodeStore
---
 .../org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java    | 1 -
 1 file changed, 1 deletion(-)

diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
index 2c99954e60..fcc0ac255b 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
@@ -93,7 +93,6 @@ import org.apache.jackrabbit.oak.plugins.document.bundlor.DocumentBundlor;
 import org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache;
 import org.apache.jackrabbit.oak.plugins.document.persistentCache.broadcast.DynamicBroadcastConfig;
 import org.apache.jackrabbit.oak.plugins.document.util.ReadOnlyDocumentStoreWrapperFactory;
-import org.apache.jackrabbit.oak.plugins.document.util.SystemPropertySupplier;
 import org.apache.jackrabbit.oak.spi.blob.BlobStore;
 import org.apache.jackrabbit.oak.commons.json.JsopStream;
 import org.apache.jackrabbit.oak.commons.json.JsopWriter;