Source:
<code>public Mono<ShouldRetryResult> shouldRetry(Exception exception) { Duration backoffTime; Duration timeout; if (!(exception instanceof RetryWithException)) { logger.debug("Operation will NOT be retried. Current attempt {}, Exception: ", this.attemptCount, exception); return Mono.just(ShouldRetryResult.noRetry()); } RetryWithException lastRetryWithException = (RetryWithException)exception; this.request.setLastRetryWithException(lastRetryWithException); long remainingMilliseconds = (this.waitTimeInSeconds * 1000) - this.durationTimer.getTime(); int currentRetryAttemptCount = this.attemptCount++; if (remainingMilliseconds <= 0) { <START> logger.debug("Received retrywith exception after backoff/retry. Will fail the request.", <END> lastRetryWithException); return Mono.just(ShouldRetryResult.error(lastRetryWithException)); } backoffTime = Duration.ofMillis( Math.min( Math.min(this.currentBackoffMilliseconds, remainingMilliseconds), RetryWithRetryPolicy.MAXIMUM_BACKOFF_TIME_IN_MS)); this.currentBackoffMilliseconds *= RetryWithRetryPolicy.BACK_OFF_MULTIPLIER; logger.debug("BackoffTime: ms.", backoffTime.toMillis()); long timeoutInMillSec = remainingMilliseconds - backoffTime.toMillis(); timeout = timeoutInMillSec > 0 ? Duration.ofMillis(timeoutInMillSec) : Duration.ofMillis(RetryWithRetryPolicy.MAXIMUM_BACKOFF_TIME_IN_MS); logger.info("Received RetryWithException, will retry, ", exception); return Mono.just(ShouldRetryResult.retryAfter(backoffTime, Quadruple.with(false, true, timeout, currentRetryAttemptCount))); }</code><technical_language>Do level needs higher at-least WARN</technical_language>

Target:
public Mono<ShouldRetryResult> shouldRetry(Exception exception) { Duration backoffTime; Duration timeout; if (!(exception instanceof RetryWithException)) { logger.debug("Operation will NOT be retried. Current attempt {}, Exception: ", this.attemptCount, exception); return Mono.just(ShouldRetryResult.noRetry()); } RetryWithException lastRetryWithException = (RetryWithException)exception; GoneAndRetryWithRetryPolicy.this.lastRetryWithException = lastRetryWithException; long remainingMilliseconds = (this.waitTimeInSeconds * 1_000L) - GoneAndRetryWithRetryPolicy.this.getElapsedTime().toMillis(); int currentRetryAttemptCount = this.attemptCount++; if (remainingMilliseconds <= 0) { logger.warn("Received RetryWithException after backoff/retry. Will fail the request.", lastRetryWithException); return Mono.just(ShouldRetryResult.error(lastRetryWithException)); } backoffTime = Duration.ofMillis( Math.min( Math.min(this.currentBackoffMilliseconds, remainingMilliseconds), RetryWithRetryPolicy.MAXIMUM_BACKOFF_TIME_IN_MS)); this.currentBackoffMilliseconds *= RetryWithRetryPolicy.BACK_OFF_MULTIPLIER; logger.debug("BackoffTime: ms.", backoffTime.toMillis()); long timeoutInMillSec = remainingMilliseconds - backoffTime.toMillis(); timeout = timeoutInMillSec > 0 ? Duration.ofMillis(timeoutInMillSec) : Duration.ofMillis(RetryWithRetryPolicy.MAXIMUM_BACKOFF_TIME_IN_MS); logger.info("Received RetryWithException, will retry, ", exception); return Mono.just(ShouldRetryResult.retryAfter(backoffTime, Quadruple.with(false, true, timeout, currentRetryAttemptCount))); }