huaxiangsun commented on a change in pull request #1613:
URL: https://github.com/apache/hbase/pull/1613#discussion_r418766943
##########
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:
I dropped this change as the fix is only targeting to a corner case for
a small time window (~10ms). regionMap is being referenced in more than 100
places, it is hard to figure out every possible case.
----------------------------------------------------------------
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]