huaxiangsun commented on a change in pull request #1924:
URL: https://github.com/apache/hbase/pull/1924#discussion_r443735473
##########
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:
Probably you are right here. The defense in master can be changed to
check its in-memory data structures, if master is not aware of the primary
region, then there is something wrong. I will move this check to region server'
region open.
----------------------------------------------------------------
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]