jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1592512 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorTest.java
Date Mon, 05 May 2014 12:41:46 GMT
Author: mreutegg
Date: Mon May  5 12:41:46 2014
New Revision: 1592512

URL: http://svn.apache.org/r1592512
Log:
OAK-1793: MongoMK GC removes documents with data still in use

Do not remove previous documents of type DEFAULT_NO_CHILD and PROP_COMMIT_ONLY

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java?rev=1592512&r1=1592511&r2=1592512&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
Mon May  5 12:41:46 2014
@@ -20,7 +20,7 @@
 package org.apache.jackrabbit.oak.plugins.document;
 
 import java.util.ArrayList;
-import java.util.EnumSet;
+import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
@@ -43,11 +43,10 @@ public class VersionGarbageCollector {
 
     /**
      * Split document types which can be safely Garbage Collected
+     * OAK-1793: SplitDocType.DEFAULT_NO_CHILD and SplitDocType.PROP_COMMIT_ONLY
+     * have been removed, but should be added again when OAK-1794 is fixed.
      */
-    private static final Set<NodeDocument.SplitDocType> GC_TYPES = EnumSet.of(
-            NodeDocument.SplitDocType.DEFAULT_NO_CHILD,
-            NodeDocument.SplitDocType.PROP_COMMIT_ONLY);
-
+    private static final Set<NodeDocument.SplitDocType> GC_TYPES = Collections.emptySet();
 
     VersionGarbageCollector(DocumentNodeStore nodeStore) {
         this.nodeStore = nodeStore;

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorTest.java?rev=1592512&r1=1592511&r2=1592512&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollectorTest.java
Mon May  5 12:41:46 2014
@@ -167,6 +167,7 @@ public class VersionGarbageCollectorTest
 
     }
 
+    @Ignore("OAK-1794")
     @Test
     public void gcSplitDocs() throws Exception{
         long maxAge = 1; //hrs
@@ -216,6 +217,7 @@ public class VersionGarbageCollectorTest
     }
 
     // OAK-1729
+    @Ignore("OAK-1794")
     @Test
     public void gcIntermediateDocs() throws Exception {
         long maxAge = 1; //hrs
@@ -300,7 +302,6 @@ public class VersionGarbageCollectorTest
     }
 
     // OAK-1793
-    @Ignore
     @Test
     public void gcPrevWithMostRecentModification() throws Exception {
         long maxAge = 1; //hrs
@@ -318,7 +319,8 @@ public class VersionGarbageCollectorTest
         clock.waitUntil(clock.getTime() + TimeUnit.HOURS.toMillis(maxAge) + delta);
 
         VersionGCStats stats = gc.gc(maxAge, TimeUnit.HOURS);
-        assertEquals(2, stats.splitDocGCCount);
+        // TODO: uncomment once OAK-1794 is fixed
+        // assertEquals(2, stats.splitDocGCCount);
 
         NodeDocument doc = getDoc("/foo");
         assertNotNull(doc);



Mime
View raw message