sguggilam commented on a change in pull request #1755:
URL: https://github.com/apache/hbase/pull/1755#discussion_r432203290
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
##########
@@ -2079,16 +2085,29 @@ private void unassign(final HRegionInfo region,
}
if (logRetries) {
- LOG.info("Server " + server + " returned " + t + " for "
- + region.getRegionNameAsString() + ", try=" + i
- + " of " + this.maximumAttempts, t);
+ LOG.info("Server " + server + " returned " + t + " for " +
region.getRegionNameAsString()
+ + ", try=" + i + " of " + this.maximumAttempts,
+ t);
// Presume retry or server will expire.
}
}
}
- // Run out of attempts
- if (state != null) {
- regionStates.updateRegionState(region, State.FAILED_CLOSE);
+
+ long sleepTime = backoffPolicy.getBackoffTime(retryConfig,
Review comment:
There are two reasons for this:
1. It also deals with the case where the sendRegionClose() itself returns
false without getting into the catch block though I am not very sure of the
case where it would reach there. the method doc says the method returns false
if it doesn't acknowledge the request
2. The exponential backoff is configurable and can even be 5 minutes , so
there is no point holding the thread for that amount of time and rather have
it deal asynchronously.
I cannot think of any state machine issue as even if just sleep the current
thread , the state would remain the same and the method as such is not
returning anything and anyone else would just check the state change made by
the method either synchronously or asynchronously. Rather we would delegate it
to a new thread and not block the current thread.
----------------------------------------------------------------
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]