huaxiangsun commented on a change in pull request #1613:
URL: https://github.com/apache/hbase/pull/1613#discussion_r418701749
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -1859,11 +1859,17 @@ public void markRegionAsMerged(final RegionInfo child,
final ServerName serverNa
throws IOException {
final RegionStateNode node =
regionStates.getOrCreateRegionStateNode(child);
node.setState(State.MERGED);
+ regionStateStore.mergeRegions(child, mergeParents, serverName);
+
+ // The order of adding merge qualifers and deleting from regionStates is
important.
+ // hbck chore depends on these merge qualifers and regionStates to check
if a region on FS
+ // is an orphan. If deleting from regionStates first, then there is a
small gap that
+ // a region is not in regionStates and there is no merge qualifer for this
region, it will be
+ // reported as an orphan.
for (RegionInfo ri: mergeParents) {
regionStates.deleteRegion(ri);
}
- regionStateStore.mergeRegions(child, mergeParents, serverName);
Review comment:
This happens during my test, which is doing a hbck report every 10 ms,
yeah, will check the sequence to make sure it does not cause any unexpected
conditions.
----------------------------------------------------------------
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]