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 da...@apache.org on 2024/10/15 10:07:41 UTC

(jackrabbit-oak) 01/01: OAK-10745 : added osgi configs for fullGc delayFactor & batch size

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

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

commit ee073037f566c4b0cf44cd0c6bcd5de9824e459d
Author: Rishabh Kumar <di...@adobe.com>
AuthorDate: Tue Oct 15 15:37:23 2024 +0530

    OAK-10745 : added osgi configs for fullGc delayFactor & batch size
---
 .../oak/plugins/document/Configuration.java        | 13 +++++++++
 .../oak/plugins/document/DocumentNodeStore.java    |  3 +-
 .../plugins/document/DocumentNodeStoreBuilder.java | 20 +++++++++++++
 .../plugins/document/DocumentNodeStoreService.java |  4 +++
 .../plugins/document/VersionGarbageCollector.java  | 24 +++++++++------
 .../DocumentNodeStoreServiceConfigurationTest.java | 34 ++++++++++++++++++----
 .../oak/plugins/document/VersionGCTest.java        | 10 ++++---
 .../document/VersionGarbageCollectorIT.java        |  5 ++--
 8 files changed, 92 insertions(+), 21 deletions(-)

diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java
index 12368f8d20..f0b00331a2 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java
@@ -353,4 +353,17 @@ import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreServic
                     "FullGC can be entirely enabled / disabled with the variable fullGCEnabled, unless fullGCEnabled " +
                     "is set to true, the fullGCMode will be ignored.")
     int fullGCMode() default DEFAULT_FULL_GC_MODE;
+
+    @AttributeDefinition(
+            name = "Delay factor for a Full GC run",
+            description = "A Full GC run has a gap of this delay factor to reduce continuous load on system." +
+                    "It allows the FullGC thread to stop by (fullGC run time * delayFactor) period after each cycle." +
+                    "The default value is " + DocumentNodeStoreService.DEFAULT_FGC_DELAY_FACTOR)
+    double fullGCDelayFactor() default DocumentNodeStoreService.DEFAULT_FGC_DELAY_FACTOR;
+
+    @AttributeDefinition(
+            name = "Batch Size to fetch data for each FullGC cycle",
+            description = "Integer value indicating the number of documents to fetch from database in a single query to check for Full GC." +
+                    "The default value is " + DocumentNodeStoreService.DEFAULT_FGC_BATCH_SIZE)
+    int fullGCBatchSize() default DocumentNodeStoreService.DEFAULT_FGC_BATCH_SIZE;
 }
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 e4d097716c..3695fbdbe6 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
@@ -653,7 +653,8 @@ public final class DocumentNodeStore
         this.asyncDelay = builder.getAsyncDelay();
         this.versionGarbageCollector = new VersionGarbageCollector(
                 this, builder.createVersionGCSupport(), isFullGCEnabled(builder), false,
-                isEmbeddedVerificationEnabled(builder), builder.getFullGCMode());
+                isEmbeddedVerificationEnabled(builder), builder.getFullGCMode(), builder.getFullGCDelayFactor(),
+                builder.getFullGCBatchSize());
         this.versionGarbageCollector.setStatisticsProvider(builder.getStatisticsProvider());
         this.versionGarbageCollector.setGCMonitor(builder.getGCMonitor());
         this.versionGarbageCollector.setFullGCPaths(builder.getFullGCIncludePaths(), builder.getFullGCExcludePaths());
diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java
index 155ab1b893..00a5bff680 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java
@@ -177,6 +177,8 @@ public class DocumentNodeStoreBuilder<T extends DocumentNodeStoreBuilder<T>> {
     private Set<String> fullGCExcludePaths = Set.of();
     private boolean embeddedVerificationEnabled = DocumentNodeStoreService.DEFAULT_EMBEDDED_VERIFICATION_ENABLED;
     private int fullGCMode = DocumentNodeStoreService.DEFAULT_FULL_GC_MODE;
+    private int fullGCBatchSize = DocumentNodeStoreService.DEFAULT_FGC_BATCH_SIZE;
+    private double fullGCDelayFactor = DocumentNodeStoreService.DEFAULT_FGC_DELAY_FACTOR;
     private long suspendTimeoutMillis = DEFAULT_SUSPEND_TIMEOUT;
 
     /**
@@ -353,6 +355,24 @@ public class DocumentNodeStoreBuilder<T extends DocumentNodeStoreBuilder<T>> {
         return this.fullGCMode;
     }
 
+    public T setFullGCBatchSize(int v) {
+        this.fullGCBatchSize = v;
+        return thisBuilder();
+    }
+
+    public int getFullGCBatchSize() {
+        return this.fullGCBatchSize;
+    }
+
+    public T setFullGCDelayFactor(double v) {
+        this.fullGCDelayFactor = v;
+        return thisBuilder();
+    }
+
+    public double getFullGCDelayFactor() {
+        return this.fullGCDelayFactor;
+    }
+
     public T setReadOnlyMode() {
         this.isReadOnlyMode = true;
         return thisBuilder();
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 115951f080..fe6cb2fa8e 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
@@ -148,6 +148,8 @@ public class DocumentNodeStoreService {
     public static final String CLASSIC_RGC_EXPR = "0 0 2 * * ?";
     public static final long DEFAULT_RGC_TIME_LIMIT_SECS = 3*60*60; // default is 3 hours
     public static final double DEFAULT_RGC_DELAY_FACTOR = 0;
+    public static final double DEFAULT_FGC_DELAY_FACTOR = 0;
+    public static final int DEFAULT_FGC_BATCH_SIZE = 1000;
     private static final String DESCRIPTION = "oak.nodestore.description";
     static final long DEFAULT_JOURNAL_GC_INTERVAL_MILLIS = 5*60*1000; // default is 5min
     static final long DEFAULT_JOURNAL_GC_MAX_AGE_MILLIS = 24*60*60*1000; // default is 24hours
@@ -503,6 +505,8 @@ public class DocumentNodeStoreService {
                 setFullGCExcludePaths(config.fullGCExcludePaths()).
                 setEmbeddedVerificationEnabled(config.embeddedVerificationEnabled()).
                 setFullGCMode(config.fullGCMode()).
+                setFullGCBatchSize(config.fullGCBatchSize()).
+                setFullGCDelayFactor(config.fullGCDelayFactor()).
                 setSuspendTimeoutMillis(config.suspendTimeoutMillis()).
                 setClusterIdReuseDelayAfterRecovery(config.clusterIdReuseDelayAfterRecoveryMillis()).
                 setRecoveryDelayMillis(config.recoveryDelayMillis()).
diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
index e67d88afba..5e9e8c25b4 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
@@ -114,7 +114,6 @@ public class VersionGarbageCollector {
     private static final int DELETE_BATCH_SIZE = 450;
     private static final int UPDATE_BATCH_SIZE = 450;
     private static final int PROGRESS_BATCH_SIZE = 10000;
-    private static final int FULL_GC_BATCH_SIZE = 1000;
     private static final int FULL_GC_MISSING_DOCS_TYPE_CACHE_SIZE = 64;
     private static final String STATUS_IDLE = "IDLE";
     private static final String STATUS_INITIALIZING = "INITIALIZING";
@@ -241,6 +240,8 @@ public class VersionGarbageCollector {
     private final boolean fullGCEnabled;
     private final boolean isFullGCDryRun;
     private final boolean embeddedVerification;
+    private final double fullGCDelayFactor;
+    private final int fullGCBatchSize;
     private Set<String> fullGCIncludePaths = Collections.emptySet();
     private Set<String> fullGCExcludePaths = Collections.emptySet();
     private final VersionGCSupport versionStore;
@@ -256,7 +257,8 @@ public class VersionGarbageCollector {
                             final boolean isFullGCDryRun,
                             final boolean embeddedVerification) {
         this(nodeStore, gcSupport, fullGCEnabled, isFullGCDryRun, embeddedVerification,
-                DocumentNodeStoreService.DEFAULT_FULL_GC_MODE);
+                DocumentNodeStoreService.DEFAULT_FULL_GC_MODE, DocumentNodeStoreService.DEFAULT_FGC_DELAY_FACTOR,
+                DocumentNodeStoreService.DEFAULT_FGC_BATCH_SIZE);
     }
 
     VersionGarbageCollector(DocumentNodeStore nodeStore,
@@ -264,13 +266,17 @@ public class VersionGarbageCollector {
                             final boolean fullGCEnabled,
                             final boolean isFullGCDryRun,
                             final boolean embeddedVerification,
-                            final int fullGCMode) {
+                            final int fullGCMode,
+                            final double fullGCDelayFactor,
+                            final int fullGCBatchSize) {
         this.nodeStore = nodeStore;
         this.versionStore = gcSupport;
         this.ds = gcSupport.getDocumentStore();
         this.fullGCEnabled = fullGCEnabled;
         this.isFullGCDryRun = isFullGCDryRun;
         this.embeddedVerification = embeddedVerification;
+        this.fullGCDelayFactor = fullGCDelayFactor;
+        this.fullGCBatchSize = fullGCBatchSize;
         this.options = new VersionGCOptions();
 
         setFullGcMode(fullGCMode);
@@ -889,7 +895,7 @@ public class VersionGarbageCollector {
                         if (log.isDebugEnabled()) {
                             log.debug("Fetching docs from [{}] to [{}] with Id starting from [{}]", timestampToString(fromModifiedMs), timestampToString(toModifiedMs), fromId);
                         }
-                        Iterable<NodeDocument> itr = versionStore.getModifiedDocs(fromModifiedMs, toModifiedMs, FULL_GC_BATCH_SIZE, fromId, fullGCIncludePaths, fullGCExcludePaths);
+                        Iterable<NodeDocument> itr = versionStore.getModifiedDocs(fromModifiedMs, toModifiedMs, fullGCBatchSize, fromId, fullGCIncludePaths, fullGCExcludePaths);
                         try {
                             for (NodeDocument doc : itr) {
                                 foundDoc = true;
@@ -2077,7 +2083,7 @@ public class VersionGarbageCollector {
                 deletedInternalPropRevsCountMap.clear();
                 deletedUnmergedBCSet.clear();
                 garbageDocsCount = 0;
-                delayOnModifications(timer.stop().elapsed(MILLISECONDS), cancel);
+                delayOnModifications(timer.stop().elapsed(MILLISECONDS), cancel, fullGCDelayFactor);
             }
         }
 
@@ -2120,8 +2126,8 @@ public class VersionGarbageCollector {
             return !traversedState.exists();
         }
     }
-    private void delayOnModifications(final long durationMs, final AtomicBoolean cancel) {
-        long delayMs = round(durationMs * options.delayFactor);
+    private void delayOnModifications(final long durationMs, final AtomicBoolean cancel, final double delayFactor) {
+        long delayMs = round(durationMs * delayFactor);
         if (!cancel.get() && delayMs > 0) {
             try {
                 Clock clock = nodeStore.getClock();
@@ -2440,7 +2446,7 @@ public class VersionGarbageCollector {
                         monitor.info(msg);
                     }
                 } finally {
-                    delayOnModifications(timer.stop().elapsed(TimeUnit.MILLISECONDS), cancel);
+                    delayOnModifications(timer.stop().elapsed(TimeUnit.MILLISECONDS), cancel, options.delayFactor);
                 }
             }
             return deletedCount;
@@ -2473,7 +2479,7 @@ public class VersionGarbageCollector {
                 }
             }
             finally {
-                delayOnModifications(timer.stop().elapsed(TimeUnit.MILLISECONDS), cancel);
+                delayOnModifications(timer.stop().elapsed(TimeUnit.MILLISECONDS), cancel, options.delayFactor);
             }
             return updateCount;
         }
diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceConfigurationTest.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceConfigurationTest.java
index cda45de77a..1a42a4182d 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceConfigurationTest.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceConfigurationTest.java
@@ -34,11 +34,15 @@ import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.component.ComponentContext;
 
 import static java.util.List.of;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_FGC_BATCH_SIZE;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_FGC_DELAY_FACTOR;
 import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_FULL_GC_ENABLED;
 import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_EMBEDDED_VERIFICATION_ENABLED;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_FULL_GC_MODE;
 import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_THROTTLING_ENABLED;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 public class DocumentNodeStoreServiceConfigurationTest {
@@ -46,11 +50,11 @@ public class DocumentNodeStoreServiceConfigurationTest {
     @Rule
     public final OsgiContext context = new OsgiContext();
 
-    private ConfigurationAdmin configAdmin = context.getService(ConfigurationAdmin.class);
+    private final ConfigurationAdmin configAdmin = context.getService(ConfigurationAdmin.class);
 
-    private TestConfig configuration = new TestConfig(Configuration.PID);
+    private final TestConfig configuration = new TestConfig(Configuration.PID);
 
-    private TestConfig preset = new TestConfig(Configuration.PRESET_PID);
+    private final TestConfig preset = new TestConfig(Configuration.PRESET_PID);
 
     @Test
     public void defaultValues() throws Exception {
@@ -73,13 +77,13 @@ public class DocumentNodeStoreServiceConfigurationTest {
         assertEquals(DocumentNodeStoreService.DEFAULT_JOURNAL_GC_INTERVAL_MILLIS, config.journalGCInterval());
         assertEquals(DocumentNodeStoreService.DEFAULT_JOURNAL_GC_MAX_AGE_MILLIS, config.journalGCMaxAge());
         assertEquals(DocumentNodeStoreService.DEFAULT_PREFETCH_EXTERNAL_CHANGES, config.prefetchExternalChanges());
-        assertEquals(null, config.role());
+        assertNull(config.role());
         assertEquals(DocumentNodeStoreService.DEFAULT_VER_GC_MAX_AGE, config.versionGcMaxAgeInSecs());
         assertEquals(DocumentNodeStoreService.DEFAULT_VER_GC_EXPRESSION, config.versionGCExpression());
         assertEquals(DocumentNodeStoreService.DEFAULT_RGC_TIME_LIMIT_SECS, config.versionGCTimeLimitInSecs());
         assertEquals(DocumentNodeStoreService.DEFAULT_BLOB_GC_MAX_AGE, config.blobGcMaxAgeInSecs());
         assertEquals(DocumentNodeStoreService.DEFAULT_BLOB_SNAPSHOT_INTERVAL, config.blobTrackSnapshotIntervalInSecs());
-        assertEquals(null, config.repository_home());
+        assertNull(config.repository_home());
         assertEquals(DocumentNodeStoreService.DEFAULT_MAX_REPLICATION_LAG, config.maxReplicationLagInSecs());
         assertEquals("MONGO", config.documentStoreType());
         assertEquals(DocumentNodeStoreService.DEFAULT_BUNDLING_DISABLED, config.bundlingDisabled());
@@ -90,6 +94,10 @@ public class DocumentNodeStoreServiceConfigurationTest {
         assertEquals("STRICT", config.leaseCheckMode());
         assertEquals(DEFAULT_THROTTLING_ENABLED, config.throttlingEnabled());
         assertEquals(DEFAULT_FULL_GC_ENABLED, config.fullGCEnabled());
+        assertEquals(DEFAULT_FULL_GC_MODE, config.fullGCMode());
+        assertEquals(DEFAULT_FGC_DELAY_FACTOR, config.fullGCDelayFactor(), 0.01);
+        assertEquals(DEFAULT_FGC_BATCH_SIZE, config.fullGCBatchSize());
+        assertEquals(DEFAULT_FULL_GC_ENABLED, config.fullGCEnabled());
         assertEquals(DEFAULT_EMBEDDED_VERIFICATION_ENABLED, config.embeddedVerificationEnabled());
         assertEquals(CommitQueue.DEFAULT_SUSPEND_TIMEOUT, config.suspendTimeoutMillis());
     }
@@ -150,6 +158,22 @@ public class DocumentNodeStoreServiceConfigurationTest {
         assertEquals(embeddedVerificationEnabled, config.embeddedVerificationEnabled());
     }
 
+    @Test
+    public void fullGCBatchSize() throws Exception {
+        int batchSize = 2000;
+        addConfigurationEntry(preset, "fullGCBatchSize", 2000);
+        Configuration config = createConfiguration();
+        assertEquals(batchSize, config.fullGCBatchSize());
+    }
+
+    @Test
+    public void fullGCDelayFactor() throws Exception {
+        double fullGCDelayFactor = 0.5d;
+        addConfigurationEntry(preset, "fullGCDelayFactor", fullGCDelayFactor);
+        Configuration config = createConfiguration();
+        assertEquals(fullGCDelayFactor, config.fullGCDelayFactor(), 0.01);
+    }
+
     @Test
     public void presetSocketKeepAlive() throws Exception {
         boolean keepAlive = !DocumentNodeStoreService.DEFAULT_SO_KEEP_ALIVE;
diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java
index 857813a503..b100c90fbe 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java
@@ -52,6 +52,8 @@ import static java.util.concurrent.TimeUnit.HOURS;
 import static java.util.concurrent.TimeUnit.MINUTES;
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.jackrabbit.oak.plugins.document.Collection.SETTINGS;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_FGC_BATCH_SIZE;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_FGC_DELAY_FACTOR;
 import static org.apache.jackrabbit.oak.plugins.document.FullGCHelper.disableFullGC;
 import static org.apache.jackrabbit.oak.plugins.document.FullGCHelper.disableFullGCDryRun;
 import static org.apache.jackrabbit.oak.plugins.document.FullGCHelper.enableFullGC;
@@ -544,7 +546,7 @@ public class VersionGCTest {
         // reinitialize VersionGarbageCollector with not allowed value
         VersionGarbageCollector gc = new VersionGarbageCollector(
                 ns, new VersionGCSupport(store), true, false, false,
-                fullGcModeNotAllowedValue);
+                fullGcModeNotAllowedValue, DEFAULT_FGC_DELAY_FACTOR, DEFAULT_FGC_BATCH_SIZE);
 
         assertEquals("Starting VersionGarbageCollector with not applicable / not allowed value" +
                 "will set fullGcMode to default NONE", VersionGarbageCollector.getFullGcMode(), VersionGarbageCollector.FullGCMode.NONE);
@@ -555,7 +557,7 @@ public class VersionGCTest {
         int fullGcModeNone = 0;
         VersionGarbageCollector gc = new VersionGarbageCollector(
                 ns, new VersionGCSupport(store), true, false, false,
-                fullGcModeNone);
+                fullGcModeNone, DEFAULT_FGC_DELAY_FACTOR, DEFAULT_FGC_BATCH_SIZE);
 
         assertEquals(gc.getFullGcMode(), VersionGarbageCollector.FullGCMode.NONE);
     }
@@ -565,7 +567,7 @@ public class VersionGCTest {
         int fullGcModeGapOrphans = 2;
         VersionGarbageCollector gc = new VersionGarbageCollector(
                 ns, new VersionGCSupport(store), true, false, false,
-                fullGcModeGapOrphans);
+                fullGcModeGapOrphans, DEFAULT_FGC_DELAY_FACTOR, DEFAULT_FGC_BATCH_SIZE);
 
         assertEquals(gc.getFullGcMode(), VersionGarbageCollector.FullGCMode.GAP_ORPHANS);
     }
@@ -575,7 +577,7 @@ public class VersionGCTest {
         int fullGcModeGapOrphansEmptyProperties = 3;
         VersionGarbageCollector gc = new VersionGarbageCollector(
                 ns, new VersionGCSupport(store), true, false, false,
-                fullGcModeGapOrphansEmptyProperties);
+                fullGcModeGapOrphansEmptyProperties, DEFAULT_FGC_DELAY_FACTOR, DEFAULT_FGC_BATCH_SIZE);
 
         assertEquals(gc.getFullGcMode(), VersionGarbageCollector.FullGCMode.GAP_ORPHANS_EMPTYPROPS);
     }
diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java
index 1a60f2bf3b..775187d491 100644
--- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java
+++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorIT.java
@@ -63,6 +63,8 @@ import static org.apache.jackrabbit.oak.api.Type.STRINGS;
 import static org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo.DEFAULT_LEASE_DURATION_MILLIS;
 import static org.apache.jackrabbit.oak.plugins.document.Collection.NODES;
 import static org.apache.jackrabbit.oak.plugins.document.Collection.SETTINGS;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_FGC_BATCH_SIZE;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.DEFAULT_FGC_DELAY_FACTOR;
 import static org.apache.jackrabbit.oak.plugins.document.FullGCHelper.assertBranchRevisionNotRemovedFromAllDocuments;
 import static org.apache.jackrabbit.oak.plugins.document.FullGCHelper.assertBranchRevisionRemovedFromAllDocuments;
 import static org.apache.jackrabbit.oak.plugins.document.FullGCHelper.enableFullGC;
@@ -104,7 +106,6 @@ import org.apache.jackrabbit.guava.common.collect.ImmutableList;
 import org.apache.jackrabbit.guava.common.collect.Iterators;
 import org.apache.jackrabbit.guava.common.collect.Lists;
 import org.apache.jackrabbit.guava.common.collect.Queues;
-import org.apache.jackrabbit.guava.common.util.concurrent.Atomics;
 import com.mongodb.ReadPreference;
 
 import org.apache.jackrabbit.oak.InitialContent;
@@ -1717,7 +1718,7 @@ public class VersionGarbageCollectorIT {
             }
         };
 
-        gcRef.set(new VersionGarbageCollector(store1, gcSupport, true, false, false, 3));
+        gcRef.set(new VersionGarbageCollector(store1, gcSupport, true, false, false, 3, DEFAULT_FGC_DELAY_FACTOR, DEFAULT_FGC_BATCH_SIZE));
 
         //3. Check that deleted property does get collected post maxAge
         clock.waitUntil(clock.getTime() + HOURS.toMillis(maxAge*2) + delta);