This is an automated email from the ASF dual-hosted git repository. haxiaolin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push: new 32a945aa9fe HBASE-27152 Under compaction mark may leak (#4725) 32a945aa9fe is described below commit 32a945aa9fea52249a801a12740b887639a99834 Author: Xiaolin Ha <haxiao...@apache.org> AuthorDate: Mon Aug 29 11:49:02 2022 +0800 HBASE-27152 Under compaction mark may leak (#4725) Signed-off-by: Duo Zhang <zhang...@apache.org> --- .../java/org/apache/hadoop/hbase/regionserver/CompactSplit.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java index 8a6e806292a..2f1fefb0949 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java @@ -382,6 +382,12 @@ public class CompactSplit implements CompactionRequester, PropagatingConfigurati // 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()) { @@ -390,7 +396,6 @@ public class CompactSplit implements CompactionRequester, PropagatingConfigurati + "store size is {}", getStoreNameForUnderCompaction(store), priority, underCompactionStores.size()); } - underCompactionStores.add(getStoreNameForUnderCompaction(store)); region.incrementCompactionsQueuedCount(); if (LOG.isDebugEnabled()) { String type = (pool == shortCompactions) ? "Small " : "Large ";