diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 95276e08130..d0600c91c36 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -1566,8 +1566,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver { // doRegionCompactionPrep(); try { status.setStatus("Compacting store " + store); - store.compact(compaction); didPerformCompaction = true; + store.compact(compaction); } catch (InterruptedIOException iioe) { String msg = "compaction interrupted"; LOG.info(msg, iioe); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java index 1a6e4964d01..5c06756b960 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java @@ -1544,9 +1544,7 @@ public class HStore implements Store { @Override public void cancelRequestedCompaction(CompactionContext compaction) { - if (compaction != null) { - finishCompactionRequest(compaction.getRequest()); - } + finishCompactionRequest(compaction.getRequest()); } private void finishCompactionRequest(CompactionRequest cr) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java index 26288fcabd4..6e70b3e54ca 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java @@ -160,9 +160,6 @@ public class TestCompaction { }).when(spyR).doRegionCompactionPrep(); // force a minor compaction, but not before requesting a stop - - // Accounting: Normally compaction requests go through HStore#requestCompaction - r.reportCompactionRequestStart(false); spyR.compactStores(); // ensure that the compaction stopped, all old files are intact,