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 65fbbd53f4a..84494126838 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 @@ -34,11 +34,13 @@ import java.util.function.Supplier; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HBaseServerException; import org.apache.hadoop.hbase.NotServingRegionException; +import org.apache.hadoop.hbase.PleaseHoldException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.TableNotEnabledException; import org.apache.hadoop.hbase.TableNotFoundException; import org.apache.hadoop.hbase.exceptions.ScannerResetException; import org.apache.hadoop.hbase.ipc.HBaseRpcController; +import org.apache.hadoop.hbase.ipc.ServerNotRunningYetException; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; import org.apache.hadoop.hbase.util.FutureUtils; import org.apache.yetus.audience.InterfaceAudience; @@ -139,6 +141,10 @@ public abstract class AsyncRpcRetryingCaller { } else { delayNs = getPauseTime(pauseNsToUse, tries - 1); } + if (!(error instanceof ServerNotRunningYetException || error instanceof PleaseHoldException)) { + // when the error does not imply dead server, do not use the retry backoff factor + delayNs = Math.min(delayNs, pauseNsToUse); + } tries++; retryTimer.newTimeout(t -> doCall(), delayNs, TimeUnit.NANOSECONDS); }