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 2022/12/22 05:07:10 UTC

[jackrabbit-oak] branch 1.22 updated: OAK-9025: use SystemPropertySupplier in DocumentNodeStoreService

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


The following commit(s) were added to refs/heads/1.22 by this push:
     new 7e02c70d37 OAK-9025: use SystemPropertySupplier in DocumentNodeStoreService
7e02c70d37 is described below

commit 7e02c70d3775d3c9201593022af7660209e7b32c
Author: Julian Reschke <re...@apache.org>
AuthorDate: Mon Apr 20 18:40:20 2020 +0000

    OAK-9025: use SystemPropertySupplier in DocumentNodeStoreService
    
    git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1876762 13f79535-47bb-0310-9956-ffa450edef68
---
 .../jackrabbit/oak/plugins/document/DocumentNodeStoreService.java      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
index 45959960a3..1afbe72f95 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
@@ -80,6 +80,7 @@ import org.apache.jackrabbit.oak.plugins.blob.datastore.BlobIdTracker;
 import org.apache.jackrabbit.oak.plugins.blob.datastore.SharedDataStoreUtils;
 import org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCacheStats;
 import org.apache.jackrabbit.oak.plugins.document.util.MongoConnection;
+import org.apache.jackrabbit.oak.plugins.document.util.SystemPropertySupplier;
 import org.apache.jackrabbit.oak.spi.cluster.ClusterRepositoryInfo;
 import org.apache.jackrabbit.oak.spi.blob.BlobStore;
 import org.apache.jackrabbit.oak.spi.blob.BlobStoreWrapper;
@@ -377,7 +378,7 @@ public class DocumentNodeStoreService {
 
         // OAK-2682: time difference detection applied at startup with a default
         // max time diff of 2000 millis (2sec)
-        final long maxDiff = Long.parseLong(System.getProperty("oak.documentMK.maxServerTimeDiffMillis", "2000"));
+        final long maxDiff = SystemPropertySupplier.create("oak.documentMK.maxServerTimeDiffMillis", 2000L).loggingTo(log).get();
         try {
             if (maxDiff>=0) {
                 final long timeDiff = ds.determineServerTimeDifferenceMillis();