This is an automated email from the ASF dual-hosted git repository.
haxiaolin pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new bd032460b86 HBASE-27152 Under compaction mark may leak (#4725) (#4744)
bd032460b86 is described below
commit bd032460b86e70b02384656d1f3a1e8f6bcffc9e
Author: Xiaolin Ha <[email protected]>
AuthorDate: Tue Aug 30 01:19:09 2022 +0800
HBASE-27152 Under compaction mark may leak (#4725) (#4744)
Signed-off-by: Duo Zhang <[email protected]>
---
.../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 ";