Skip to content

Commit bd03246

Browse files
authored
HBASE-27152 Under compaction mark may leak (#4725) (#4744)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent 0640efa commit bd03246

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,12 @@ protected void requestCompactionInternal(HRegion region, HStore store, String wh
382382
// pool; we will do selection there, and move to large pool if necessary.
383383
pool = shortCompactions;
384384
}
385+
386+
// A simple implementation for under compaction marks.
387+
// Since this method is always called in the synchronized methods, we do not need to use the
388+
// boolean result to make sure that exactly the one that added here will be removed
389+
// in the next steps.
390+
underCompactionStores.add(getStoreNameForUnderCompaction(store));
385391
pool.execute(
386392
new CompactionRunner(store, region, compaction, tracker, completeTracker, pool, user));
387393
if (LOG.isDebugEnabled()) {
@@ -390,7 +396,6 @@ protected void requestCompactionInternal(HRegion region, HStore store, String wh
390396
+ "store size is {}",
391397
getStoreNameForUnderCompaction(store), priority, underCompactionStores.size());
392398
}
393-
underCompactionStores.add(getStoreNameForUnderCompaction(store));
394399
region.incrementCompactionsQueuedCount();
395400
if (LOG.isDebugEnabled()) {
396401
String type = (pool == shortCompactions) ? "Small " : "Large ";

0 commit comments

Comments
 (0)