Revert "HBASE-12454 Setting didPerformCompaction early in HRegion#compact"

This reverts commit 16decdc19a.
This commit is contained in:
Andrew Purtell 2014-11-12 12:31:10 -08:00
parent 17e2de3494
commit d0c34fb4a3
3 changed files with 2 additions and 7 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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,