private void reportTransitionFailedOpen(MasterProcedureEnv env, RegionStateNode regionNode, ServerName serverName) { if (!isOpening(regionNode, serverName, TransitionCode.FAILED_OPEN)) { return; } // there is no openSeqNum for FAILED_OPEN, so we will check the target server instead if (!regionNode.getRegionLocation().equals(serverName)) { LOG.warn( "Received report {} transition from {} for {}, pid={}," + " but the region is not on it, should be a retry, ignore", TransitionCode.FAILED_OPEN, regionNode, serverName, getProcId()); return; } // just wake up the procedure and see if we can retry // Notice that, even if we arrive here, this call could still be a retry, as we may retry // opening on the same server again. And the assumption here is that, once the region state is // OPENING, and the TRSP state is REGION_STATE_TRANSITION_CONFIRM_OPENED, the TRSP must have // been suspended on the procedure event, so after the waking operation here, the TRSP will be // executed and try to schedule new OpenRegionProcedure again. Once there is a successful open // then we are done, so the TRSP will not be stuck. // TODO: maybe we could send the procedure id of the OpenRegionProcedure to the region server // and let the region server send it back when done, so it will be easy to detect whether this // is a retry. regionNode.getProcedureEvent().wake(env.getProcedureScheduler()); }
private void reportTransitionOpen(MasterProcedureEnv env, RegionStateNode regionNode, ServerName serverName, long openSeqNum) throws IOException { if (!isOpening(regionNode, serverName, TransitionCode.OPENED)) { return;