rmdmattingly commented on code in PR #5226: URL: https://github.com/apache/hbase/pull/5226#discussion_r1200907765
########## hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncScanSingleRegionRpcRetryingCaller.java: ########## @@ -420,10 +422,17 @@ private void onError(Throwable error) { } long delayNs; long pauseNsToUse = - HBaseServerException.isServerOverloaded(error) ? pauseNsForServerOverloaded : pauseNs; + HBaseServerExceptionPauseManager.getPauseNanos(error, pauseNsForServerOverloaded, pauseNs); + if ( + error instanceof RpcThrottlingException && pauseNsToUse > remainingTimeNs() - SLEEP_DELTA_NS + ) { + completeExceptionally(!scannerClosed); + return; + } if (scanTimeoutNs > 0) { - long maxDelayNs = remainingTimeNs() - SLEEP_DELTA_NS; - if (maxDelayNs <= 0) { + long remainingTimeNs = remainingTimeNs(); + long maxDelayNs = remainingTimeNs - SLEEP_DELTA_NS; + if (maxDelayNs <= 0 || maxDelayNs <= pauseNsToUse) { Review Comment: Yeah you're right -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org