Skip to content

Commit

Permalink
HBASE-27152 Under compaction mark may leak (#4725) (#4744)
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
sunhelly authored Aug 29, 2022
1 parent 0640efa commit bd03246
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,12 @@ protected void requestCompactionInternal(HRegion region, HStore store, String wh
// pool; we will do selection there, and move to large pool if necessary.
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(
new CompactionRunner(store, region, compaction, tracker, completeTracker, pool, user));
if (LOG.isDebugEnabled()) {
Expand All @@ -390,7 +396,6 @@ protected void requestCompactionInternal(HRegion region, HStore store, String wh
+ "store size is {}",
getStoreNameForUnderCompaction(store), priority, underCompactionStores.size());
}
underCompactionStores.add(getStoreNameForUnderCompaction(store));
region.incrementCompactionsQueuedCount();
if (LOG.isDebugEnabled()) {
String type = (pool == shortCompactions) ? "Small " : "Large ";
Expand Down

0 comments on commit bd03246

Please sign in to comment.