Author: mreutegg
Date: Tue Mar 27 13:24:47 2018
New Revision: 1827835

URL: http://svn.apache.org/viewvc?rev=1827835&view=rev
Log:
OAK-7378: Continuous Revision GC counts _deletedOnce with every run

Implement fix and enable test

Modified:
    
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
    
jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java

Modified: 
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java?rev=1827835&r1=1827834&r2=1827835&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
 Tue Mar 27 13:24:47 2018
@@ -1078,6 +1078,10 @@ public class VersionGarbageCollector {
                     log.debug("previous runs recommend a {} sec duration, 
scope now {}",
                             
TimeUnit.MILLISECONDS.toSeconds(suggestedIntervalMs), scope);
                 }
+            } else if (scope.getDurationMs() <= options.precisionMs) {
+                // the scope is smaller than the minimum precision
+                // -> no need to refine the scope
+                log.debug("scope <= precision ({} ms)", options.precisionMs);
             } else {
                 /* Need to guess. Count the overall number of _deletedOnce 
documents. If those
                  * are more than we want to collect in a single run, reduce 
the time scope so

Modified: 
jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java?rev=1827835&r1=1827834&r2=1827835&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGCTest.java
 Tue Mar 27 13:24:47 2018
@@ -45,7 +45,6 @@ import org.apache.jackrabbit.oak.stats.C
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -241,7 +240,6 @@ public class VersionGCTest {
     }
 
     // OAK-7378
-    @Ignore("OAK-7378")
     @Test
     public void recommendedInterval() throws Exception {
         AtomicLong deletedOnceCountCalls = new AtomicLong();


Reply via email to