.../org/apache/hadoop/hbase/regionserver/CompactingMemStore.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java index 7aaece6..91457e5 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java @@ -256,8 +256,6 @@ public class CompactingMemStore extends AbstractMemStore { InMemoryFlushRunnable runnable = new InMemoryFlushRunnable(); LOG.info("Dispatching the MemStore in-memory flush for store " + store.getColumnFamilyName()); getPool().execute(runnable); - // guard against queuing same old compactions over and over again - inMemoryFlushInProgress.set(true); } } @@ -278,10 +276,9 @@ public class CompactingMemStore extends AbstractMemStore { } // Phase II: Compact the pipeline try { - if (allowCompaction.get()) { + if (allowCompaction.get() && inMemoryFlushInProgress.compareAndSet(false, true)) { // setting the inMemoryFlushInProgress flag again for the case this method is invoked // directly (only in tests) in the common path setting from true to true is idempotent - inMemoryFlushInProgress.set(true); // Speculative compaction execution, may be interrupted if flush is forced while // compaction is in progress compactor.startCompaction();