From 3f40df8085d74c6cdecd2daa0a9e88e4defb8c86 Mon Sep 17 00:00:00 2001 From: Duo Zhang Date: Tue, 30 Apr 2019 11:47:35 +0800 Subject: [PATCH] HBASE-22325 AsyncRpcRetryingCaller will not schedule retry if we hit a NotServingRegionException but there is no TableName provided --- .../hadoop/hbase/client/AsyncRpcRetryingCaller.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java index dcf7aa154f9b..586e7d52e074 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java @@ -126,7 +126,7 @@ protected final void resetCallTimeout() { resetController(controller, callTimeoutNs, priority); } - private void tryScheduleRetry(Throwable error, Consumer updateCachedLocation) { + private void tryScheduleRetry(Throwable error) { long pauseNsToUse = error instanceof CallQueueTooBigException ? pauseForCQTBENs : pauseNs; long delayNs; if (operationTimeoutNs > 0) { @@ -192,19 +192,21 @@ protected final void onError(Throwable t, Supplier errMsg, future.completeExceptionally(e); } else { // failed to test whether the table is disabled, not a big deal, continue retrying - tryScheduleRetry(error, updateCachedLocation); + tryScheduleRetry(error); } return; } if (disabled) { future.completeExceptionally(new TableNotEnabledException(tableName.get())); } else { - tryScheduleRetry(error, updateCachedLocation); + tryScheduleRetry(error); } }); + } else { + tryScheduleRetry(error); } } else { - tryScheduleRetry(error, updateCachedLocation); + tryScheduleRetry(error); } }