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

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Xiaolin Ha 2022-08-29 11:49:02 +08:00 committed by GitHub
parent fa02350a27
commit 32a945aa9f
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 ";