wchevreuil commented on code in PR #4945:
URL: https://github.com/apache/hbase/pull/4945#discussion_r1082877385
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/TransitRegionStateProcedure.java:
##########
@@ -188,6 +196,27 @@ protected boolean waitInitialized(MasterProcedureEnv env) {
return am.waitMetaLoaded(this) || am.waitMetaAssigned(this, getRegion());
}
+ private void checkAndWaitForOriginalServer(MasterProcedureEnv env,
ServerName lastHost)
+ throws ProcedureSuspendedException {
+ ServerManager serverManager = env.getMasterServices().getServerManager();
+ ServerName newNameForServer =
serverManager.findServerWithSameHostnamePortWithLock(lastHost);
+ boolean isOnline =
serverManager.createDestinationServersList().contains(newNameForServer);
+
+ if (!isOnline && retries <
env.getAssignmentManager().getForceRegionRetainmentRetries()) {
+ retries++;
+ LOG.info("Suspending the TRSP PID={} because {} is true and previous
host {} "
+ + "for region is not yet online.", this.getProcId(),
FORCE_REGION_RETAINMENT, lastHost);
+ setTimeout(env.getAssignmentManager().getForceRegionRetainmentWait());
Review Comment:
Switched to use RetryCounter and exponential backoff.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]