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 al...@apache.org on 2014/08/22 16:44:03 UTC

svn commit: r1619823 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java

Author: alexparvulescu
Date: Fri Aug 22 14:44:03 2014
New Revision: 1619823

URL: http://svn.apache.org/r1619823
Log:
OAK-2040 Tar compaction: log a warning if there is more than one checkpoint
 - added warn message when there is more than one checkpoint

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java?rev=1619823&r1=1619822&r2=1619823&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java Fri Aug 22 14:44:03 2014
@@ -53,6 +53,7 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.segment.RecordId;
 import org.apache.jackrabbit.oak.plugins.segment.Segment;
 import org.apache.jackrabbit.oak.plugins.segment.SegmentId;
+import org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore;
 import org.apache.jackrabbit.oak.plugins.segment.SegmentTracker;
 import org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState;
 import org.apache.jackrabbit.oak.plugins.segment.SegmentStore;
@@ -487,6 +488,14 @@ public class FileStore implements Segmen
         Compactor compactor = new Compactor(writer);
 
         SegmentNodeState before = getHead();
+        long existing = before.getChildNode(SegmentNodeStore.CHECKPOINTS)
+                .getChildNodeCount(Long.MAX_VALUE);
+        if (existing > 1) {
+            log.warn(
+                    "TarMK compaction found {} checkpoints, you might need to run checkpoint cleanup",
+                    existing);
+        }
+
         SegmentNodeState after = compactor.compact(EMPTY_NODE, before);
         writer.flush();
         while (!setHead(before, after)) {