saintstack commented on a change in pull request #1584:
URL: https://github.com/apache/hbase/pull/1584#discussion_r414880416



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
##########
@@ -1846,6 +1846,16 @@ public static void deleteMergeQualifiers(Connection 
connection, final RegionInfo
       qualifiers.add(qualifier);
       delete.addColumns(getCatalogFamily(), qualifier, 
HConstants.LATEST_TIMESTAMP);
     }
+
+    // There will be race condition that a GCMultipleMergedRegionsProcedure is 
scheduled while
+    // the previous GCMultipleMergedRegionsProcedure is still going on, in 
this case, the second
+    // GCMultipleMergedRegionsProcedure could delete the merged region by 
accident!
+    if (qualifiers.isEmpty()) {

Review comment:
       Should we add a lock on the merge region instead of this?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to