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 md...@apache.org on 2016/09/13 08:18:07 UTC

svn commit: r1760490 - in /jackrabbit/oak/trunk/oak-segment-tar/src: main/java/org/apache/jackrabbit/oak/segment/ main/java/org/apache/jackrabbit/oak/segment/compaction/ main/java/org/apache/jackrabbit/oak/segment/file/ main/java/org/apache/jackrabbit/...

Author: mduerig
Date: Tue Sep 13 08:18:07 2016
New Revision: 1760490

URL: http://svn.apache.org/viewvc?rev=1760490&view=rev
Log:
OAK-4731: Refine forced compaction
Add timeout to forced compaction

Modified:
    jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java
    jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentGCOptions.java
    jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGC.java
    jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGCMBean.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/segment/CompactionAndCleanupIT.java
    jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionIT.java
    jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionMBean.java

Modified: jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java?rev=1760490&r1=1760489&r2=1760490&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java (original)
+++ jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java Tue Sep 13 08:18:07 2016
@@ -24,9 +24,8 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.commons.PropertiesUtil.toInteger;
 import static org.apache.jackrabbit.oak.commons.PropertiesUtil.toLong;
 import static org.apache.jackrabbit.oak.osgi.OsgiUtil.lookupConfigurationThenFramework;
-import static org.apache.jackrabbit.oak.segment.compaction.SegmentGCOptions.FORCE_AFTER_FAIL_DEFAULT;
+import static org.apache.jackrabbit.oak.segment.compaction.SegmentGCOptions.FORCE_TIMEOUT_DEFAULT;
 import static org.apache.jackrabbit.oak.segment.compaction.SegmentGCOptions.GAIN_THRESHOLD_DEFAULT;
-import static org.apache.jackrabbit.oak.segment.compaction.SegmentGCOptions.LOCK_WAIT_TIME_DEFAULT;
 import static org.apache.jackrabbit.oak.segment.compaction.SegmentGCOptions.MEMORY_THRESHOLD_DEFAULT;
 import static org.apache.jackrabbit.oak.segment.compaction.SegmentGCOptions.PAUSE_DEFAULT;
 import static org.apache.jackrabbit.oak.segment.compaction.SegmentGCOptions.RETRY_COUNT_DEFAULT;
@@ -214,21 +213,14 @@ public class SegmentNodeStoreService ext
     public static final String COMPACTION_RETRY_COUNT = "compaction.retryCount";
 
     @Property(
-            boolValue = FORCE_AFTER_FAIL_DEFAULT,
-            label = "Force Compaction",
-            description = "Whether or not to force compact concurrent commits on top of already " +
-                    " compacted commits after the maximum number of retries has been reached. " +
-                    "Force committing tries to exclusively write lock the node store."
+            intValue = FORCE_TIMEOUT_DEFAULT,
+            label = "Force Compaction Timeout",
+            description = "Number of seconds to attempt to force compact concurrent commits on top " +
+                    "of already compacted commits after the maximum number of retries has been " +
+                    "reached. Forced compaction tries to acquire an exclusive write lock on the " +
+                    "node store."
     )
-    public static final String COMPACTION_FORCE_AFTER_FAIL = "compaction.forceAfterFail";
-
-    @Property(
-            intValue = LOCK_WAIT_TIME_DEFAULT,
-            label = "Compaction Lock Wait Time",
-            description = "Number of seconds to wait for the lock for committing compacted changes " +
-                    "respectively to wait for the exclusive write lock for force committing."
-    )
-    public static final String COMPACTION_LOCK_WAIT_TIME = "compaction.lockWaitTime";
+    public static final String COMPACTION_FORCE_TIMEOUT = "compaction.force.timeout";
 
     @Property(
             longValue = SIZE_DELTA_ESTIMATION_DEFAULT,
@@ -533,17 +525,15 @@ public class SegmentNodeStoreService ext
     private SegmentGCOptions newGCOptions() {
         boolean pauseCompaction = toBoolean(property(PAUSE_COMPACTION), PAUSE_DEFAULT);
         int retryCount = toInteger(property(COMPACTION_RETRY_COUNT), RETRY_COUNT_DEFAULT);
-        boolean forceAfterFail = toBoolean(property(COMPACTION_FORCE_AFTER_FAIL), FORCE_AFTER_FAIL_DEFAULT);
-        int lockWaitTime = toInteger(property(COMPACTION_LOCK_WAIT_TIME), LOCK_WAIT_TIME_DEFAULT);
+        int forceTimeout = toInteger(property(COMPACTION_FORCE_TIMEOUT), FORCE_TIMEOUT_DEFAULT);
 
         byte memoryThreshold = getMemoryThreshold();
         byte gainThreshold = getGainThreshold();
         long sizeDeltaEstimation = toLong(COMPACTION_SIZE_DELTA_ESTIMATION, SIZE_DELTA_ESTIMATION_DEFAULT);
 
-        return new SegmentGCOptions(pauseCompaction, memoryThreshold,
-                gainThreshold, retryCount, forceAfterFail, lockWaitTime)
-                .setForceAfterFail(forceAfterFail).setGcSizeDeltaEstimation(
-                        sizeDeltaEstimation);
+        return new SegmentGCOptions(
+                pauseCompaction, memoryThreshold, gainThreshold, retryCount, forceTimeout)
+                .setGcSizeDeltaEstimation(sizeDeltaEstimation);
     }
 
     private boolean registerSegmentNodeStore() throws IOException {

Modified: jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentGCOptions.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentGCOptions.java?rev=1760490&r1=1760489&r2=1760490&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentGCOptions.java (original)
+++ jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentGCOptions.java Tue Sep 13 08:18:07 2016
@@ -47,14 +47,9 @@ public class SegmentGCOptions {
     public static final int RETRY_COUNT_DEFAULT = 5;
 
     /**
-     * Default value for {@link #getForceAfterFail()}
+     * Default value for {@link #getForceTimeout()} in seconds.
      */
-    public static final boolean FORCE_AFTER_FAIL_DEFAULT = false;
-
-    /**
-     * Default value for {@link #getLockWaitTime()}
-     */
-    public static final int LOCK_WAIT_TIME_DEFAULT = 60;
+    public static final int FORCE_TIMEOUT_DEFAULT = 60;
 
     /**
      * Default value for {@link #getRetainedGenerations()}
@@ -74,9 +69,7 @@ public class SegmentGCOptions {
 
     private int retryCount = RETRY_COUNT_DEFAULT;
 
-    private boolean forceAfterFail = FORCE_AFTER_FAIL_DEFAULT;
-
-    private int lockWaitTime = LOCK_WAIT_TIME_DEFAULT;
+    private int forceTimeout = FORCE_TIMEOUT_DEFAULT;
 
     private int retainedGenerations = RETAINED_GENERATIONS_DEFAULT;
 
@@ -94,24 +87,22 @@ public class SegmentGCOptions {
             SIZE_DELTA_ESTIMATION_DEFAULT);
 
     public SegmentGCOptions(boolean paused, int memoryThreshold, int gainThreshold,
-                            int retryCount, boolean forceAfterFail, int lockWaitTime) {
+                            int retryCount, int forceTimeout) {
         this.paused = paused;
         this.memoryThreshold = memoryThreshold;
         this.gainThreshold = gainThreshold;
         this.retryCount = retryCount;
-        this.forceAfterFail = forceAfterFail;
-        this.lockWaitTime = lockWaitTime;
+        this.forceTimeout = forceTimeout;
     }
 
     public SegmentGCOptions() {
         this(PAUSE_DEFAULT, MEMORY_THRESHOLD_DEFAULT, GAIN_THRESHOLD_DEFAULT,
-                RETRY_COUNT_DEFAULT, FORCE_AFTER_FAIL_DEFAULT, LOCK_WAIT_TIME_DEFAULT);
+                RETRY_COUNT_DEFAULT, FORCE_TIMEOUT_DEFAULT);
     }
 
     /**
      * Default options: {@link #PAUSE_DEFAULT}, {@link #MEMORY_THRESHOLD_DEFAULT},
-     * {@link #GAIN_THRESHOLD_DEFAULT}, {@link #RETRY_COUNT_DEFAULT},
-     * {@link #FORCE_AFTER_FAIL_DEFAULT}, {@link #LOCK_WAIT_TIME_DEFAULT}.
+     * {@link #GAIN_THRESHOLD_DEFAULT}, {@link #RETRY_COUNT_DEFAULT}, {@link #FORCE_TIMEOUT_DEFAULT}.
      */
     public static SegmentGCOptions defaultGCOptions() {
         return new SegmentGCOptions();
@@ -190,44 +181,26 @@ public class SegmentGCOptions {
     }
 
     /**
-     * Get whether or not to force compact concurrent commits on top of already
-     * compacted commits after the maximum number of retries has been reached.
-     * Force committing tries to exclusively write lock the node store.
-     * @return  {@code true} if force commit is on, {@code false} otherwise
-     */
-    public boolean getForceAfterFail() {
-        return forceAfterFail;
-    }
-
-    /**
-     * Set whether or not to force compact concurrent commits on top of already
-     * compacted commits after the maximum number of retries has been reached.
-     * Force committing tries to exclusively write lock the node store.
-     * @param forceAfterFail
-     * @return this instance
-     */
-    public SegmentGCOptions setForceAfterFail(boolean forceAfterFail) {
-        this.forceAfterFail = forceAfterFail;
-        return this;
-    }
-
-    /**
-     * Get the time to wait for the lock when force compacting.
-     * See {@link #setForceAfterFail(boolean)}
-     * @return lock wait time in seconds.
+     * Get the number of seconds to attempt to force compact concurrent commits on top of
+     * already compacted commits after the maximum number of retries has been reached.
+     * Forced compaction acquires an exclusive write lock on the node store.
+     * @return  the number of seconds until forced compaction gives up and the exclusive
+     *          write lock on the node store is released.
      */
-    public int getLockWaitTime() {
-        return lockWaitTime;
+    public int getForceTimeout() {
+        return forceTimeout;
     }
 
     /**
-     * Set the time to wait for the lock when force compacting.
-     * @param lockWaitTime  lock wait time in seconds
-     * @return
+     * Set the number of seconds to attempt to force compact concurrent commits on top of
+     * already compacted commits after the maximum number of retries has been reached.
+     * Forced compaction acquires an exclusively write lock on the node store.
+     * @param timeout  the number of seconds until forced compaction gives up and the exclusive
+     *                 lock on the node store is released.
      * @return this instance
      */
-    public SegmentGCOptions setLockWaitTime(int lockWaitTime) {
-        this.lockWaitTime = lockWaitTime;
+    public SegmentGCOptions setForceTimeout(int timeout) {
+        this.forceTimeout = timeout;
         return this;
     }
 
@@ -270,8 +243,7 @@ public class SegmentGCOptions {
                     ", memoryThreshold=" + memoryThreshold +
                     ", gainThreshold=" + gainThreshold +
                     ", retryCount=" + retryCount +
-                    ", forceAfterFail=" + forceAfterFail +
-                    ", lockWaitTime=" + lockWaitTime +
+                    ", forceTimeout=" + forceTimeout +
                     ", retainedGenerations=" + retainedGenerations +
                     ", gcSizeDeltaEstimation=" + gcSizeDeltaEstimation + "}";
         }

Modified: jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGC.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGC.java?rev=1760490&r1=1760489&r2=1760490&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGC.java (original)
+++ jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGC.java Tue Sep 13 08:18:07 2016
@@ -74,33 +74,22 @@ public interface SegmentRevisionGC {
     void setRetryCount(int retryCount);
 
     /**
-     * Get whether or not to force compact concurrent commits on top of already
-     * compacted commits after the maximum number of retries has been reached.
-     * Force committing tries to exclusively write lock the node store.
-     * @return  {@code true} if force commit is on, {@code false} otherwise
+     * Get the number of seconds to attempt to force compact concurrent commits on top of
+     * already compacted commits after the maximum number of retries has been reached.
+     * Forced compaction acquires an exclusive write lock on the node store.
+     * @return  the number of seconds until forced compaction gives up and the exclusive
+     *          write lock on the node store is released.
      */
-    boolean getForceAfterFail();
+    int getForceTimeout();
 
     /**
-     * Set whether or not to force compact concurrent commits on top of already
-     * compacted commits after the maximum number of retries has been reached.
-     * Force committing tries to exclusively write lock the node store.
-     * @param forceAfterFail
+     * Set the number of seconds to attempt to force compact concurrent commits on top of
+     * already compacted commits after the maximum number of retries has been reached.
+     * Forced compaction acquires an exclusively write lock on the node store.
+     * @param timeout  the number of seconds until forced compaction gives up and the exclusive
+     *                 lock on the node store is released.
      */
-    void setForceAfterFail(boolean forceAfterFail);
-
-    /**
-     * Get the time to wait for the lock when force compacting.
-     * See {@link #setForceAfterFail(boolean)}
-     * @return lock wait time in seconds.
-     */
-    int getLockWaitTime();
-
-    /**
-     * Set the time to wait for the lock when force compacting.
-     * @param lockWaitTime  lock wait time in seconds
-     */
-    void setLockWaitTime(int lockWaitTime);
+    void setForceTimeout(int timeout);
 
     /**
      * Number of segment generations to retain.

Modified: jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGCMBean.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGCMBean.java?rev=1760490&r1=1760489&r2=1760490&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGCMBean.java (original)
+++ jackrabbit/oak/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/compaction/SegmentRevisionGCMBean.java Tue Sep 13 08:18:07 2016
@@ -74,23 +74,13 @@ public class SegmentRevisionGCMBean
     }
 
     @Override
-    public boolean getForceAfterFail() {
-        return gcOptions.getForceAfterFail();
+    public int getForceTimeout() {
+        return gcOptions.getForceTimeout();
     }
 
     @Override
-    public void setForceAfterFail(boolean forceAfterFail) {
-        gcOptions.setForceAfterFail(forceAfterFail);
-    }
-
-    @Override
-    public int getLockWaitTime() {
-        return gcOptions.getLockWaitTime();
-    }
-
-    @Override
-    public void setLockWaitTime(int lockWaitTime) {
-        gcOptions.setLockWaitTime(lockWaitTime);
+    public void setForceTimeout(int timeout) {
+        gcOptions.setForceTimeout(timeout);
     }
 
     @Override

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=1760490&r1=1760489&r2=1760490&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 Tue Sep 13 08:18:07 2016
@@ -27,6 +27,7 @@ import static com.google.common.collect.
 import static com.google.common.collect.Maps.newLinkedHashMap;
 import static com.google.common.collect.Sets.newHashSet;
 import static java.lang.String.format;
+import static java.lang.System.currentTimeMillis;
 import static java.lang.Thread.currentThread;
 import static java.nio.ByteBuffer.wrap;
 import static java.util.Collections.emptyMap;
@@ -61,6 +62,7 @@ import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.ReadWriteLock;
@@ -76,6 +78,7 @@ import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.base.Stopwatch;
 import com.google.common.base.Supplier;
+import com.google.common.base.Suppliers;
 import com.google.common.collect.ImmutableList;
 import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
 import org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean;
@@ -971,6 +974,38 @@ public class FileStore implements Segmen
     }
 
     /**
+     * @param duration
+     * @param unit
+     * @return  {@code Supplier} instance which returns true once the time specified in
+     * {@code duration} and {@code unit} has passed.
+     */
+    private static Supplier<Boolean> timeOut(final long duration, @Nonnull final TimeUnit unit) {
+        return new Supplier<Boolean>() {
+            long deadline = currentTimeMillis() + MILLISECONDS.convert(duration, unit);
+            @Override
+            public Boolean get() {
+                return currentTimeMillis() > deadline;
+            }
+        };
+    }
+
+    /**
+     * @param supplier1
+     * @param supplier2
+     * @return {@code Supplier} instance that returns {@code true} iff {@code supplier1} returns
+     * {@code true} or otherwise {@code supplier2} returns {@code true}.
+     */
+    private static Supplier<Boolean> or(
+            @Nonnull Supplier<Boolean> supplier1,
+            @Nonnull Supplier<Boolean> supplier2) {
+        if (supplier1.get()) {
+            return Suppliers.ofInstance(true);
+        } else {
+            return supplier2;
+        }
+    }
+
+    /**
      * Returns a signal indication the file store shutting down.
      * @return  a shutdown signal
      */
@@ -1043,10 +1078,12 @@ public class FileStore implements Segmen
             if (!success) {
                 gcListener.info("TarMK GC #{}: compaction gave up compacting concurrent commits after {} cycles.",
                         GC_COUNT, cycles);
-                if (gcOptions.getForceAfterFail()) {
-                    gcListener.info("TarMK GC #{}: compaction force compacting remaining commits", GC_COUNT);
+                int forceTimeout = gcOptions.getForceTimeout();
+                if (forceTimeout > 0) {
+                    gcListener.info("TarMK GC #{}: trying to force compact remaining commits for {} seconds",
+                        GC_COUNT, forceTimeout);
                     cycles++;
-                    success = forceCompact(bufferWriter, cancel);
+                    success = forceCompact(bufferWriter, or(cancel, timeOut(forceTimeout, SECONDS)));
                     if (!success) {
                         gcListener.warn("TarMK GC #{}: compaction failed to force compact remaining commits. " +
                             "Most likely compaction didn't get exclusive access to the store or was " +
@@ -1111,10 +1148,12 @@ public class FileStore implements Segmen
                 @Override
                 public RecordId apply(RecordId base) {
                     try {
+                        long t0 = currentTimeMillis();
                         SegmentNodeState after = compact(bufferWriter,
                                 segmentReader.readNode(base), cancel);
                         if (after == null) {
-                            gcListener.info("TarMK GC #{}: compaction cancelled.", GC_COUNT);
+                            gcListener.info("TarMK GC #{}: compaction cancelled after {} seconds",
+                                GC_COUNT, (currentTimeMillis() - t0) / 1000);
                             return null;
                         } else {
                             return after.getRecordId();
@@ -1125,7 +1164,7 @@ public class FileStore implements Segmen
                     }
                 }
             },
-            timeout(gcOptions.getLockWaitTime(), SECONDS));
+            timeout(gcOptions.getForceTimeout(), SECONDS));
     }
 
     public Iterable<SegmentId> getSegmentIds() {

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=1760490&r1=1760489&r2=1760490&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 Tue Sep 13 08:18:07 2016
@@ -25,7 +25,6 @@ import java.io.File;
 import java.io.IOException;
 import java.io.RandomAccessFile;
 
-import org.apache.jackrabbit.oak.segment.compaction.SegmentGCOptions;
 import org.apache.jackrabbit.oak.segment.file.FileStore;
 import org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException;
 import org.apache.jackrabbit.oak.segment.file.JournalReader;
@@ -146,11 +145,7 @@ public class Compact implements Runnable
     }
 
     private FileStore newFileStore() throws IOException, InvalidFileStoreVersionException {
-        return fileStoreBuilder(path.getAbsoluteFile()).withGCOptions(newGCOptions()).build();
-    }
-
-    private SegmentGCOptions newGCOptions() {
-        return defaultGCOptions().setForceAfterFail(force).setOffline();
+        return fileStoreBuilder(path.getAbsoluteFile()).withGCOptions(defaultGCOptions().setOffline()).build();
     }
 
 }

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=1760490&r1=1760489&r2=1760490&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 Tue Sep 13 08:18:07 2016
@@ -565,7 +565,6 @@ public class CompactionAndCleanupIT {
         FileStore store = fileStoreBuilder(getFileStoreFolder())
                 .withMaxFileSize(2)
                 .withMemoryMapping(true)
-                .withGCOptions(defaultGCOptions().setForceAfterFail(true))
                 .build();
         final SegmentNodeStore nodeStore = SegmentNodeStoreBuilders.builder(store).build();
         final AtomicBoolean compactionSuccess = new AtomicBoolean(true);

Modified: jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionIT.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionIT.java?rev=1760490&r1=1760489&r2=1760490&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionIT.java (original)
+++ jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionIT.java Tue Sep 13 08:18:07 2016
@@ -143,7 +143,6 @@ public class SegmentCompactionIT {
 
     private volatile ListenableFuture<?> compactor = immediateCancelledFuture();
     private volatile ReadWriteLock compactionLock = null;
-    private volatile int lockWaitTime = 60;
     private volatile int maxReaders = 10;
     private volatile int maxWriters = 10;
     private volatile long maxStoreSize = 200000000000L;
@@ -222,7 +221,7 @@ public class SegmentCompactionIT {
     public void setUp() throws Exception {
         assumeTrue(ENABLED);
 
-        SegmentGCOptions gcOptions = defaultGCOptions().setLockWaitTime(lockWaitTime);
+        SegmentGCOptions gcOptions = defaultGCOptions();
         ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
         fileStore = fileStoreBuilder(folder.getRoot())
                 .withMemoryMapping(true)
@@ -794,16 +793,6 @@ public class SegmentCompactionIT {
         }
 
         @Override
-        public void setLockWaitTime(int seconds) {
-            lockWaitTime = seconds;
-        }
-
-        @Override
-        public int getLockWaitTime() {
-            return lockWaitTime;
-        }
-
-        @Override
         public void setMaxReaders(int count) {
             checkArgument(count >= 0);
             maxReaders = count;

Modified: jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionMBean.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionMBean.java?rev=1760490&r1=1760489&r2=1760490&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionMBean.java (original)
+++ jackrabbit/oak/trunk/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentCompactionMBean.java Tue Sep 13 08:18:07 2016
@@ -73,20 +73,6 @@ public interface SegmentCompactionMBean
     boolean getUseCompactionLock();
 
     /**
-     * Time to wait for the commit lock for committing the compacted head.
-     * @param seconds  number of seconds to wait
-     * @see SegmentNodeStore#locked(java.util.concurrent.Callable, long, java.util.concurrent.TimeUnit)
-     */
-    void setLockWaitTime(int seconds);
-
-    /**
-     * Time to wait for the commit lock for committing the compacted head.
-     * @return  number of seconds
-     * @see SegmentNodeStore#locked(java.util.concurrent.Callable, long, java.util.concurrent.TimeUnit)
-     */
-    int getLockWaitTime();
-
-    /**
      * Set the maximal number of concurrent readers
      * @param count
      */