huaxiangsun commented on a change in pull request #1924:
URL: https://github.com/apache/hbase/pull/1924#discussion_r443796817



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/TransitRegionStateProcedure.java
##########
@@ -338,6 +345,35 @@ protected Flow executeFromState(MasterProcedureEnv env, 
RegionStateTransitionSta
     try {
       switch (state) {
         case REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE:
+
+          // Need to do some sanity check for replica region, if the region 
does not exist at file
+          // system, do not try to assign the replica region, log error and 
return.
+          // Do not rely on master's in-memory state, primary region got its 
own life, it can be
+          // closed, offline for various reasons.

Review comment:
       Updated to check primary region's inmemory state for defense.




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