[
https://issues.apache.org/jira/browse/FLINK-33698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
lincoln lee reassigned FLINK-33698:
-----------------------------------
Assignee: xiangyu feng
> 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
> Assignee: xiangyu feng
> Priority: Major
> Labels: pull-request-available
>
> 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)