HBASE-20100 TestEnableTableProcedure flakey
Allow OPEN as a possible state when update region transition state. Usually state is OPENING but if crash before finish step is completed, on replay, master may have read that the state is OPEN from meta table and so will think it open... When we replay the procedure finish, allow that the region is already OPEN.
This commit is contained in:
parent
06cf04e458
commit
7d7ca33e6d
|
@ -208,7 +208,7 @@ public class AssignProcedure extends RegionTransitionProcedure {
|
|||
}
|
||||
}
|
||||
}
|
||||
LOG.info("Start " + this + "; " + regionNode.toShortString() +
|
||||
LOG.info("Starting " + this + "; " + regionNode.toShortString() +
|
||||
"; forceNewPlan=" + this.forceNewPlan +
|
||||
", retain=" + retain);
|
||||
env.getAssignmentManager().queueAssign(regionNode);
|
||||
|
|
|
@ -60,6 +60,8 @@ public class RegionStates {
|
|||
private static final Logger LOG = LoggerFactory.getLogger(RegionStates.class);
|
||||
|
||||
protected static final State[] STATES_EXPECTED_ON_OPEN = new State[] {
|
||||
State.OPEN, // State may already be OPEN if we died after receiving the OPEN from regionserver
|
||||
// but before complete finish of AssignProcedure. HBASE-20100.
|
||||
State.OFFLINE, State.CLOSED, // disable/offline
|
||||
State.SPLITTING, State.SPLIT, // ServerCrashProcedure
|
||||
State.OPENING, State.FAILED_OPEN, // already in-progress (retrying)
|
||||
|
|
|
@ -322,6 +322,7 @@ public abstract class RegionTransitionProcedure
|
|||
|
||||
case REGION_TRANSITION_FINISH:
|
||||
// 3. wait assignment response. completion/failure
|
||||
LOG.debug("Finishing {}; {}", this, regionNode.toShortString());
|
||||
finishTransition(env, regionNode);
|
||||
am.removeRegionInTransition(regionNode, this);
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue