ndimiduk commented on a change in pull request #2014:
URL: https://github.com/apache/hbase/pull/2014#discussion_r456725385
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/TransitRegionStateProcedure.java
##########
@@ -200,14 +200,21 @@ private void queueAssign(MasterProcedureEnv env,
RegionStateNode regionNode)
}
}
- private void openRegion(MasterProcedureEnv env, RegionStateNode regionNode)
throws IOException {
+ private void openRegion(MasterProcedureEnv env, RegionStateNode regionNode)
+ throws IOException, ProcedureSuspendedException {
ServerName loc = regionNode.getRegionLocation();
if (loc == null) {
LOG.warn("No location specified for {}, jump back to state {} to get
one", getRegion(),
RegionStateTransitionState.REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE);
setNextState(RegionStateTransitionState.REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE);
return;
}
+ final boolean isMeta = regionNode.getRegionInfo().isMetaRegion();
+ final boolean isMetaAvailable =
!env.getAssignmentManager().isMetaRegionInTransition();
+ if (!isMeta && !isMetaAvailable) {
+ // meta is not assigned yet, so yield
+ throw new ProcedureSuspendedException();
Review comment:
I agree, neither this code nor the proposed change provide a
satisfactory solution. However, I think if we can avoid turning the TRSP over
to the worker thread when we know meta is unavailable, we reduce the window of
risk. Another change might alter the configuration of the client that attempts
the meta update: instead of retrying for the full loop, it would try a single
RPC and if that fails yield the procedure. That way the PEWorker isn't occupied
by the default client retry logic.
----------------------------------------------------------------
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]