Skip to content

Commit

Permalink
HBASE-14013 Retry when RegionServerNotYetRunningException rather than…
Browse files Browse the repository at this point in the history
… go ahead with assign so for sure we don't skip WAL replay
  • Loading branch information
saintstack committed Jul 2, 2015
1 parent 7ffd149 commit 71a523a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -896,15 +896,15 @@ private void unassign(final HRegionInfo region,
if (t instanceof RemoteException) {
t = ((RemoteException)t).unwrapRemoteException();
}
if (t instanceof RegionServerAbortedException) {
if (t instanceof RegionServerAbortedException
|| t instanceof RegionServerStoppedException
|| t instanceof ServerNotRunningYetException) {
// RS is aborting, we cannot offline the region since the region may need to do WAL
// recovery. Until we see the RS expiration, we should retry.
sleepTime = 1 + conf.getInt(RpcClient.FAILED_SERVER_EXPIRY_KEY,
RpcClient.FAILED_SERVER_EXPIRY_DEFAULT);

} else if (t instanceof NotServingRegionException
|| t instanceof RegionServerStoppedException
|| t instanceof ServerNotRunningYetException) {
} else if (t instanceof NotServingRegionException) {
LOG.debug("Offline " + region.getRegionNameAsString()
+ ", it's not any more on " + server, t);
regionStates.updateRegionState(region, State.OFFLINE);
Expand Down

0 comments on commit 71a523a

Please sign in to comment.