Author: mduerig
Date: Fri Aug 11 15:01:11 2017
New Revision: 1804790

URL: http://svn.apache.org/viewvc?rev=1804790&view=rev
Log:
OAK-6399: Re-establish full offline compaction functionality
Properly initialise the compaction monitor in the case where only compaction is 
run

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

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=1804790&r1=1804789&r2=1804790&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
 Fri Aug 11 15:01:11 2017
@@ -603,7 +603,6 @@ public class FileStore extends AbstractF
         private void run(Supplier<CompactionResult> compact) throws 
IOException {
             try {
                 gcListener.info("TarMK GC #{}: started", 
GC_COUNT.incrementAndGet());
-                compactionMonitor = new 
GCNodeWriteMonitor(gcOptions.getGcLogInterval(), gcListener);
 
                 long dt = System.currentTimeMillis() - lastSuccessfullGC;
                 if (dt < GC_BACKOFF) {
@@ -721,6 +720,7 @@ public class FileStore extends AbstractF
 
                 GCJournalEntry gcEntry = gcJournal.read();
                 long initialSize = size();
+                compactionMonitor = new 
GCNodeWriteMonitor(gcOptions.getGcLogInterval(), gcListener);
                 compactionMonitor.init(GC_COUNT.get(), gcEntry.getRepoSize(), 
gcEntry.getNodes(), initialSize);
 
                 SegmentNodeState before = getHead();


Reply via email to