HBASE-22325 AsyncRpcRetryingCaller will not schedule retry if we hit a NotServingRegionException but there is no TableName provided

This commit is contained in:
Duo Zhang 2019-04-30 11:47:35 +08:00 committed by Apache9
parent f9f6354393
commit 3f40df8085
1 changed files with 6 additions and 4 deletions

View File

@ -126,7 +126,7 @@ public abstract class AsyncRpcRetryingCaller<T> {
resetController(controller, callTimeoutNs, priority); resetController(controller, callTimeoutNs, priority);
} }
private void tryScheduleRetry(Throwable error, Consumer<Throwable> updateCachedLocation) { private void tryScheduleRetry(Throwable error) {
long pauseNsToUse = error instanceof CallQueueTooBigException ? pauseForCQTBENs : pauseNs; long pauseNsToUse = error instanceof CallQueueTooBigException ? pauseForCQTBENs : pauseNs;
long delayNs; long delayNs;
if (operationTimeoutNs > 0) { if (operationTimeoutNs > 0) {
@ -192,19 +192,21 @@ public abstract class AsyncRpcRetryingCaller<T> {
future.completeExceptionally(e); future.completeExceptionally(e);
} else { } else {
// failed to test whether the table is disabled, not a big deal, continue retrying // failed to test whether the table is disabled, not a big deal, continue retrying
tryScheduleRetry(error, updateCachedLocation); tryScheduleRetry(error);
} }
return; return;
} }
if (disabled) { if (disabled) {
future.completeExceptionally(new TableNotEnabledException(tableName.get())); future.completeExceptionally(new TableNotEnabledException(tableName.get()));
} else { } else {
tryScheduleRetry(error, updateCachedLocation); tryScheduleRetry(error);
} }
}); });
} else {
tryScheduleRetry(error);
} }
} else { } else {
tryScheduleRetry(error, updateCachedLocation); tryScheduleRetry(error);
} }
} }