HBASE-27152 Under compaction mark may leak (#4725) (#4744)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Xiaolin Ha 2022-08-30 01:19:09 +08:00 committed by GitHub
parent 0640efac7e
commit bd032460b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -382,6 +382,12 @@ public class CompactSplit implements CompactionRequester, PropagatingConfigurati
// pool; we will do selection there, and move to large pool if necessary. // pool; we will do selection there, and move to large pool if necessary.
pool = shortCompactions; pool = shortCompactions;
} }
// A simple implementation for under compaction marks.
// Since this method is always called in the synchronized methods, we do not need to use the
// boolean result to make sure that exactly the one that added here will be removed
// in the next steps.
underCompactionStores.add(getStoreNameForUnderCompaction(store));
pool.execute( pool.execute(
new CompactionRunner(store, region, compaction, tracker, completeTracker, pool, user)); new CompactionRunner(store, region, compaction, tracker, completeTracker, pool, user));
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
@ -390,7 +396,6 @@ public class CompactSplit implements CompactionRequester, PropagatingConfigurati
+ "store size is {}", + "store size is {}",
getStoreNameForUnderCompaction(store), priority, underCompactionStores.size()); getStoreNameForUnderCompaction(store), priority, underCompactionStores.size());
} }
underCompactionStores.add(getStoreNameForUnderCompaction(store));
region.incrementCompactionsQueuedCount(); region.incrementCompactionsQueuedCount();
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
String type = (pool == shortCompactions) ? "Small " : "Large "; String type = (pool == shortCompactions) ? "Small " : "Large ";