Umeshkumar9414 commented on code in PR #8264:
URL: https://github.com/apache/hbase/pull/8264#discussion_r3354118425


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManagerUtil.java:
##########
@@ -298,4 +299,16 @@ static void checkClosedRegion(MasterProcedureEnv env, 
RegionInfo regionInfo) thr
         + ", abort split/merge to prevent data loss");
     }
   }
+
+  /**
+   * For splitting, need to test both region info and state, and will return 
true if either of the
+   * test returns true. Please see the comments in
+   * {@link AssignmentManager#markRegionAsSplit(RegionInfo, ServerName, 
RegionInfo, RegionInfo)} for
+   * more details on why we need to test two conditions.
+   */
+  static boolean isSplitOrMerged(RegionStateNode regionStateNode) {

Review Comment:
   This was intentional @apurtell . As soon as region got splitted or merged we 
remove that from the RegionStates. And even if HMaster is restarted while 
[loading the regions in 
](https://github.com/apache/hbase/pull/8264/changes/BASE..a6fa2651419f2422b771268bd734f96a8b4b6524#diff-8701f497f12ec66e8fe4cfcc91b1876d95793172eecf5a269f40f126283ac145L1886)visitRegionState,
 we don't add those regions back to visitRegionState RegionStates. So I think 
we are fine not adding the extra check. 
   Let me know if I am missing something.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to