From 28e3458830fb09ebf37d18f74293ea6d1ed0799b 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 2bdfade647b..1fbd2240e43 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 @@ -117,7 +117,7 @@ public abstract class AsyncRpcRetryingCaller { resetController(controller, callTimeoutNs); } - private void tryScheduleRetry(Throwable error, Consumer updateCachedLocation) { + private void tryScheduleRetry(Throwable error) { long delayNs; if (operationTimeoutNs > 0) { long maxDelayNs = remainingTimeNs() - SLEEP_DELTA_NS; @@ -182,19 +182,21 @@ public abstract class AsyncRpcRetryingCaller { 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); } }