EdColeman commented on PR #3231:
URL: https://github.com/apache/accumulo/pull/3231#issuecomment-1462171595
The following seems close to what is wanted (I build this against 3.0, so
there may be changes needed for 1.10) Ignore the time and count values - they
were picked for convenience and not what we'd what to use here.
```
Retry.builder().maxRetries(10).retryAfter(50,
MILLISECONDS).incrementBy(100, MILLISECONDS)
.maxWait(maxWaitSec,
SECONDS).backOffFactor(2.0).logInterval(1, SECONDS).createRetry();
...
while(retry.canRetry()){
attempts++;
retry.logRetry(log, "current counts " + attempts);
retry.waitForNextAttempt(log, "pause for next attempt");
retry.useRetry();
}
```
I think things to note:
- maxWait set the max delay and factors in with the backoff, the delay time
will increase up to that value with each attempt.
- maxRetries is a count
- removing infiniteRetries() and then adding useRetry is required to advance
the retry attempt logic
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]