Author: frm
Date: Thu Jul 27 10:57:26 2017
New Revision: 1803163

URL: http://svn.apache.org/viewvc?rev=1803163&view=rev
Log:
OAK-6485 - Expose tail and full compaction via different methods

Modified:
    
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/tool/Compact.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/backup/FileStoreBackupTest.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ExternalBlobIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/HeavyWriteIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ManyChildNodesIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentDataStoreBlobGCIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentOverflowExceptionIT.java
    
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/FileStoreIT.java

Modified: 
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RefreshOnGCTest.java
 Thu Jul 27 10:57:26 2017
@@ -70,7 +70,7 @@ public class RefreshOnGCTest {
         compact = new Callable<Void>() {
             @Override
             public Void call() throws Exception {
-                fileStore.compact();
+                fileStore.compactFull();
                 return null;
             }
         };
@@ -146,4 +146,4 @@ public class RefreshOnGCTest {
     }
 
 
-}
\ No newline at end of file
+}

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java
 Thu Jul 27 10:57:26 2017
@@ -106,7 +106,7 @@ public class FileStore extends AbstractF
 
     /**
      * Minimal interval in milli seconds between subsequent garbage collection 
cycles.
-     * Garbage collection invoked via {@link #gc()} will be skipped unless at 
least
+     * Garbage collection invoked via {@link #fullGC()} will be skipped unless 
at least
      * the specified time has passed since its last successful invocation.
      */
     private static final long GC_BACKOFF = getInteger("oak.gc.backoff", 
10*3600*1000);
@@ -285,7 +285,7 @@ public class FileStore extends AbstractF
             @Override
             public void run() {
                 try {
-                    gc();
+                    fullGC();
                 } catch (IOException e) {
                     log.error("Error running revision garbage collection", e);
                 }
@@ -324,11 +324,17 @@ public class FileStore extends AbstractF
     }
 
     /**
-     * Run garbage collection: estimation, compaction, cleanup
-     * @throws IOException
+     * Run full garbage collection: estimation, compaction, cleanup.
      */
-    public void gc() throws IOException {
-        garbageCollector.run();
+    public void fullGC() throws IOException {
+        garbageCollector.runFull();
+    }
+
+    /**
+     * Run tail garbage collection.
+     */
+    public void tailGC() throws IOException {
+        garbageCollector.runTail();
     }
 
     /**
@@ -345,8 +351,12 @@ public class FileStore extends AbstractF
      * reference to them).
      * @return {@code true} on success, {@code false} otherwise.
      */
-    public boolean compact() {
-        return garbageCollector.compact().isSuccess();
+    public boolean compactFull() {
+        return garbageCollector.compactFull().isSuccess();
+    }
+
+    public boolean compactTail() {
+        return garbageCollector.compactTail().isSuccess();
     }
 
     /**
@@ -544,7 +554,10 @@ public class FileStore extends AbstractF
 
         private volatile boolean cancelled;
 
-        /** Timestamp of the last time {@link #gc()} was successfully invoked. 
0 if never. */
+        /**
+         * Timestamp of the last time {@link #fullGC()} or {@link #tailGC()} 
was
+         * successfully invoked. 0 if never.
+         */
         private long lastSuccessfullGC;
 
         GarbageCollector(
@@ -561,7 +574,15 @@ public class FileStore extends AbstractF
             this.statisticsProvider = statisticsProvider;
         }
 
-        synchronized void run() throws IOException {
+        synchronized void runFull() throws IOException {
+            run(this::compactFull);
+        }
+
+        synchronized void runTail() throws IOException {
+            run(this::compactTail);
+        }
+
+        private void run(Supplier<CompactionResult> compact) throws 
IOException {
             try {
                 gcListener.info("TarMK GC #{}: started", 
GC_COUNT.incrementAndGet());
 
@@ -608,7 +629,7 @@ public class FileStore extends AbstractF
     
                 if (sufficientEstimatedGain) {
                     if (!gcOptions.isPaused()) {
-                        CompactionResult compactionResult = compact();
+                        CompactionResult compactionResult = compact.get();
                         if (compactionResult.isSuccess()) {
                             lastSuccessfullGC = System.currentTimeMillis();
                         } else {
@@ -653,14 +674,28 @@ public class FileStore extends AbstractF
         private SegmentNodeState getBase() {
             String root = gcJournal.read().getRoot();
             RecordId rootId = RecordId.fromString(tracker, root);
-            return RecordId.NULL.equals(rootId)
-                ? null  // FIXME OAK-3349 if no previous compacted base is 
found we fall back to full compaction by returning null. Add an respective log 
statement
-                : segmentReader.readNode(rootId);  // FIXME OAK-3349 guard 
against SNFE and against rebasing onto a non compactor written state in case 
someone tampered with the journal.log. Add logging.
+            if (RecordId.NULL.equals(rootId)) {
+                return null;
+            }
+            // FIXME OAK-3349 guard against SNFE and against rebasing onto a 
non compactor written state in case someone tampered with the journal.log. Add 
logging.
+            // FIXME OAK-3349 this method never throws a SNFE, how to protect 
against it?
+            return segmentReader.readNode(rootId);
+        }
+
+        synchronized CompactionResult compactFull() {
+            return compact(null, getGcGeneration().nextFull());
+        }
+
+        synchronized CompactionResult compactTail() {
+            SegmentNodeState base = getBase();
+            if (base != null) {
+                return compact(base, getGcGeneration().nextTail());
+            }
+            log.warn("Tail compaction requested but no base state available, 
falling back to full compaction");
+            return compactFull();
         }
 
-        synchronized CompactionResult compact() {
-            // FIXME OAK-3349 the generation needs to reflect the type of 
compaction: tail or full. Additionally we need to handler the graceful 
degradation case should #getBase() return null where we would fall back from a 
tail compaction to a full compaction.
-            final GCGeneration newGeneration = getGcGeneration().nextFull();
+        private CompactionResult compact(SegmentNodeState base, GCGeneration 
newGeneration) {
             try {
                 Stopwatch watch = Stopwatch.createStarted();
                 gcListener.info("TarMK GC #{}: compaction started, gc 
options={}", GC_COUNT, gcOptions);
@@ -681,7 +716,7 @@ public class FileStore extends AbstractF
                 OnlineCompactor compactor = new OnlineCompactor(
                         segmentReader, writer, getBlobStore(), cancel, 
compactionMonitor::onNode);
 
-                SegmentNodeState after = compact(getBase(), before, compactor, 
writer);
+                SegmentNodeState after = compact(base, before, compactor, 
writer);
                 if (after == null) {
                     gcListener.warn("TarMK GC #{}: compaction cancelled: {}.", 
GC_COUNT, cancel);
                     return compactionAborted(newGeneration);

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/tool/Compact.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/tool/Compact.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/tool/Compact.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/tool/Compact.java
 Thu Jul 27 10:57:26 2017
@@ -117,7 +117,7 @@ public class Compact implements Runnable
 
     private void compact() throws IOException, 
InvalidFileStoreVersionException {
         try (FileStore store = newFileStore()) {
-            store.compact();
+            store.compactFull();
         }
 
         System.out.println("    -> cleaning up");

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/backup/FileStoreBackupTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/backup/FileStoreBackupTest.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/backup/FileStoreBackupTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/backup/FileStoreBackupTest.java
 Thu Jul 27 10:57:26 2017
@@ -80,7 +80,7 @@ public class FileStoreBackupTest {
             fsb.backup(source.getReader(), source.getRevisions(), destination);
             compare(source, destination);
 
-            source.compact();
+            source.compactFull();
             fsb.cleanup(source);
             fsb.backup(source.getReader(), source.getRevisions(), destination);
             compare(source, destination);

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java
 Thu Jul 27 10:57:26 2017
@@ -159,7 +159,7 @@ public class CompactionAndCleanupIT {
             assertTrue("the store should grow", size3 > size2);
 
             // 1st gc cycle -> no reclaimable garbage...
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
 
             long size4 = fileStore.getStats().getApproximateSize();
@@ -175,7 +175,7 @@ public class CompactionAndCleanupIT {
             assertTrue("the store should grow of at least the size of the 
blob", size5 - size4 >= blobSize);
 
             // 2st gc cycle -> 1st blob should get collected
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
 
             long size6 = fileStore.getStats().getApproximateSize();
@@ -183,7 +183,7 @@ public class CompactionAndCleanupIT {
             assertTrue("the store should shrink of at least the size of the 
blob", size5 - size6 >= blobSize);
 
             // 3rtd gc cycle -> no  significant change
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
 
             long size7 = fileStore.getStats().getApproximateSize();
@@ -247,7 +247,7 @@ public class CompactionAndCleanupIT {
             assertTrue("the size should grow", size3 > size2);
 
             // 1st gc cycle -> 1st blob should get collected
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
 
             long size4 = fileStore.getStats().getApproximateSize();
@@ -265,14 +265,14 @@ public class CompactionAndCleanupIT {
             assertTrue("the store should grow of at least the size of the 
blob", size5 - size4 > blobSize);
 
             // 2st gc cycle -> 2nd blob should *not* be collected
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
 
             long size6 = fileStore.getStats().getApproximateSize();
             assertTrue("the blob should not be collected", Math.abs(size5 - 
size6) < blobSize);
 
             // 3rd gc cycle -> no significant change
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
 
             long size7 = fileStore.getStats().getApproximateSize();
@@ -313,7 +313,7 @@ public class CompactionAndCleanupIT {
             }
             nodeStore.merge(extra, EmptyHook.INSTANCE, CommitInfo.EMPTY);
             fileStore.flush();
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
             // Compacts to 548Kb
             long size0 = fileStore.getStats().getApproximateSize();
@@ -362,7 +362,7 @@ public class CompactionAndCleanupIT {
             nodeStore.merge(rootBuilder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
 
             NodeState initialRoot = nodeStore.getRoot();
-            assertTrue(fileStore.compact());
+            assertTrue(fileStore.compactFull());
             NodeState compactedRoot = nodeStore.getRoot();
 
             assertTrue(initialRoot != compactedRoot);
@@ -412,7 +412,7 @@ public class CompactionAndCleanupIT {
             }
 
             long size1 = fileStore.getStats().getApproximateSize();
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
             long size2 = fileStore.getStats().getApproximateSize();
             assertSize("with compacted binaries", size2, 0, size1 - blobSize);
@@ -469,7 +469,7 @@ public class CompactionAndCleanupIT {
             }
 
             long size1 = fileStore.getStats().getApproximateSize();
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
             long size2 = fileStore.getStats().getApproximateSize();
 
@@ -526,7 +526,7 @@ public class CompactionAndCleanupIT {
 
             // 5Mb, de-duplication by the SegmentWriter
             long size1 = fileStore.getStats().getApproximateSize();
-            fileStore.compact();
+            fileStore.compactFull();
             fileStore.cleanup();
             long size2 = fileStore.getStats().getApproximateSize();
             assertSize("with compacted binaries", size2, 0, size1 * 11 / 10);
@@ -605,7 +605,7 @@ public class CompactionAndCleanupIT {
             public Boolean call() throws IOException {
                 boolean cancelled = false;
                 for (int k = 0; !cancelled && k < 1000; k++) {
-                    cancelled = !fileStore.compact();
+                    cancelled = !fileStore.compactFull();
                 }
                 return cancelled;
             }
@@ -659,7 +659,7 @@ public class CompactionAndCleanupIT {
 
                 // Cancelling gc should not cause a SNFE on subsequent gc runs
                 runAsync(cancel);
-                fileStore.gc();
+                fileStore.fullGC();
             }
         } finally {
             fileStore.close();
@@ -731,7 +731,7 @@ public class CompactionAndCleanupIT {
             });
             threads[k].start();
         }
-        store.compact();
+        store.compactFull();
         run.set(false);
         for (Thread t : threads) {
             t.join();
@@ -859,7 +859,7 @@ public class CompactionAndCleanupIT {
                 // Ensure cleanup is efficient by surpassing the number of
                 // retained generations
                 for (int k = 0; k < 
defaultGCOptions().getRetainedGenerations(); k++) {
-                    fileStore.compact();
+                    fileStore.compactFull();
                 }
 
                 // case 2: merge above changes after compact
@@ -1015,7 +1015,7 @@ public class CompactionAndCleanupIT {
             // Ensure cleanup is efficient by surpassing the number of
             // retained generations
             for (int k = 0; k < gcOptions.getRetainedGenerations(); k++) {
-                fileStore.compact();
+                fileStore.compactFull();
             }
             fileStore.cleanup();
 
@@ -1077,7 +1077,7 @@ public class CompactionAndCleanupIT {
                 cp.uncompacted = nodeStore.retrieve(cp.id);
             }
 
-            fileStore.compact();
+            fileStore.compactFull();
 
             NodeState compactedSuperRoot = fileStore.getHead();
             NodeState compactedRoot = nodeStore.getRoot();
@@ -1118,7 +1118,7 @@ public class CompactionAndCleanupIT {
             NodeState uncompactedSuperRoot = fileStore.getHead();
             NodeState uncompactedRoot = nodeStore.getRoot();
 
-            fileStore.compact();
+            fileStore.compactFull();
 
             NodeState compactedSuperRoot = fileStore.getHead();
             NodeState compactedRoot = nodeStore.getRoot();
@@ -1146,7 +1146,7 @@ public class CompactionAndCleanupIT {
             builder.setChildNode("x").setChildNode("xx");
 
             SegmentNodeState uncompacted = (SegmentNodeState) 
nodeStore.getRoot();
-            fileStore.compact();
+            fileStore.compactFull();
             NodeState compacted = nodeStore.getRoot();
 
             assertEquals(uncompacted, compacted);
@@ -1448,7 +1448,7 @@ public class CompactionAndCleanupIT {
             fileStore.collectBlobReferences(expectedReferences::add);
 
             for(int k = 1; k <= 3; k++) {
-                fileStore.gc();
+                fileStore.fullGC();
                 Set<String> actualReferences = newHashSet();
                 fileStore.collectBlobReferences(actualReferences::add);
                 assertEquals("Binary should be retained after " + k + "-th gc 
cycle",

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ExternalBlobIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ExternalBlobIT.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ExternalBlobIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ExternalBlobIT.java
 Thu Jul 27 10:57:26 2017
@@ -288,7 +288,7 @@ public class ExternalBlobIT {
                 .withGCOptions(gcOptions).build();
         assertTrue(store.getStats().getApproximateSize() < 10 * 1024);
 
-        store.compact();
+        store.compactFull();
         store.cleanup();
 
     }

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/HeavyWriteIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/HeavyWriteIT.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/HeavyWriteIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/HeavyWriteIT.java
 Thu Jul 27 10:57:26 2017
@@ -71,7 +71,7 @@ public class HeavyWriteIT {
             public void run() {
                 for (int k = 1; run.get(); k++) {
                     try {
-                        store.gc();
+                        store.fullGC();
                         Thread.sleep(5000);
                     } catch (InterruptedException e) {
                         Thread.currentThread().interrupt();

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ManyChildNodesIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ManyChildNodesIT.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ManyChildNodesIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ManyChildNodesIT.java
 Thu Jul 27 10:57:26 2017
@@ -111,7 +111,7 @@ public class ManyChildNodesIT {
             nodeStore.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
 
             NodeState uncompactedRoot = nodeStore.getRoot();
-            assertTrue(fileStore.compact());
+            assertTrue(fileStore.compactFull());
             NodeState compactedRoot = nodeStore.getRoot();
             assertTrue(uncompactedRoot != compactedRoot);
             assertEquals(uncompactedRoot, compactedRoot);

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentDataStoreBlobGCIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentDataStoreBlobGCIT.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentDataStoreBlobGCIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentDataStoreBlobGCIT.java
 Thu Jul 27 10:57:26 2017
@@ -218,7 +218,7 @@ public class SegmentDataStoreBlobGCIT {
         // Ensure cleanup is efficient by surpassing the number of
         // retained generations
         for (int k = 0; k < gcOptions.getRetainedGenerations(); k++) {
-            store.compact();
+            store.compactFull();
         }
         store.cleanup();
 

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentOverflowExceptionIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentOverflowExceptionIT.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentOverflowExceptionIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentOverflowExceptionIT.java
 Thu Jul 27 10:57:26 2017
@@ -108,7 +108,7 @@ public class SegmentOverflowExceptionIT
 
                     if (compact) {
                         compact = false;
-                        fileStore.gc();
+                        fileStore.fullGC();
                     }
                 } catch (SegmentNotFoundException snfe) {
                     // Usually this can be ignored as SNFEs are somewhat 
expected here

Modified: 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/FileStoreIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/FileStoreIT.java?rev=1803163&r1=1803162&r2=1803163&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/FileStoreIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/FileStoreIT.java
 Thu Jul 27 10:57:26 2017
@@ -76,7 +76,7 @@ public class FileStoreIT {
         store.close();
 
         store = 
fileStoreBuilder(getFileStoreFolder()).withMaxFileSize(1).withMemoryMapping(memoryMapping).build();
-        store.gc();
+        store.fullGC();
         store.flush();
         store.close();
 


Reply via email to