[ https://issues.apache.org/jira/browse/KAFKA-9800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17074241#comment-17074241 ]
Cheng Tan edited comment on KAFKA-9800 at 4/3/20, 3:16 AM: ----------------------------------------------------------- Some thoughts: *Call* retry(failedCallRetryContext){ failedRetryContext = failedCall.getRetryContext; this.retryContext.update(failedRetryContext) _if_ (tries > maxRetries) \{ failWithTimeout(now, throwable); _return_; } else \{ } } getRetryContext()\{ return retryContext } getNextAllowTryMS\{ } *Retry context* getNextAllowTryMs() { return nextAllowTryMs; } getNumTry() { return numTry } updateNextAllowTryMs(currentAllowTryMs) { |MIN(retry.backoff.max.ms, (retry.backoff.ms * 2**(failures - 1)) * random(0.8, 1.2))| } updateNumTry(currentNumTry) { numTry = currentNumTry++; } updateRetryContext(failedCallRetryContext) { updateNextAllowTryMs(failedCallRetryContext.getNextAllowTryMs) updateNumTry(failedCallRetryContext.getNumTry) } was (Author: d8tltanc): Some thoughts: *Call* retry(failedCallRetryContext){ failedRetryContext = failedCall.getRetryContext; this.retryContext.update(failedRetryContext) _if_ (tries > maxRetries) { failWithTimeout(now, throwable); _return_; } else { } } getRetryContext(){ return retryContext } getNextAllowTryMS{ } *Retry context* getNextAllowTryMs() { return nextAllowTryMs; } getNumTry() { return numTry } updateNextAllowTryMs(currentAllowTryMs) { |MIN(retry.backoff.max.ms, (retry.backoff.ms * 2**(failures - 1)) * random(0.8, 1.2))| } updateNumTry(currentNumTry) { numTry = currentNumTry++; } updateRetryContext(failedCallRetryContext){ updateNextAllowTryMs(failedCallRetryContext.getNextAllowTryMs) updateNumTry(failedCallRetryContext.getNumTry) } > [KIP-580] Admin Client Exponential Backoff Implementation > --------------------------------------------------------- > > Key: KAFKA-9800 > URL: https://issues.apache.org/jira/browse/KAFKA-9800 > Project: Kafka > Issue Type: New Feature > Reporter: Cheng Tan > Assignee: Cheng Tan > Priority: Major > Labels: KIP-580 > > In {{KafkaAdminClient}}, we will have to modify the way the retry backoff is > calculated for the calls that have failed and need to be retried. >From the > current static retry backoff, we have to introduce a mechanism for all calls > that upon failure, the next retry time is dynamically calculated. -- This message was sent by Atlassian Jira (v8.3.4#803005)