[ https://issues.apache.org/jira/browse/FLINK-33698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791252#comment-17791252 ]
xiangyu feng commented on FLINK-33698: -------------------------------------- Hi [~lincoln.86xy] , what do you think about this? > Fix the backoff time calculation in ExponentialBackoffDelayRetryStrategy > ------------------------------------------------------------------------ > > Key: FLINK-33698 > URL: https://issues.apache.org/jira/browse/FLINK-33698 > Project: Flink > Issue Type: Bug > Components: API / DataStream > Reporter: xiangyu feng > Priority: Major > > The backoff time calculation in `ExponentialBackoffDelayRetryStrategy` should > consider currentAttempts. > > Current Version: > {code:java} > @Override > public long getBackoffTimeMillis(int currentAttempts) { > if (currentAttempts <= 1) { > // equivalent to initial delay > return lastRetryDelay; > } > long backoff = Math.min((long) (lastRetryDelay * multiplier), > maxRetryDelay); > this.lastRetryDelay = backoff; > return backoff; > } {code} > Fixed Version: > {code:java} > @Override > public long getBackoffTimeMillis(int currentAttempts) { > if (currentAttempts <= 1) { > // equivalent to initial delay > return initialDelay; > } > long backoff = > Math.min( > (long) (initialDelay * Math.pow(multiplier, > currentAttempts - 1)), > maxRetryDelay); > return backoff; > } {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)