Skip to content

Prevent exponential backoff delay from overflowing#199

Open
skateinmars wants to merge 1 commit intovmihailenco:v3from
skateinmars:fix/exponential-backoff-overflow
Open

Prevent exponential backoff delay from overflowing#199
skateinmars wants to merge 1 commit intovmihailenco:v3from
skateinmars:fix/exponential-backoff-overflow

Conversation

@skateinmars
Copy link

Because of the bit shifting used in the exponential backoff computation, an overflow can happen given some specific values for min/max backoff.

Here is a snippet to show the current and fixed behavior: https://go.dev/play/p/V2tno9piKly

This PR fixes it without trying to change the "normal" behavior by simply using the max backoff value when an overflow happens.

@skateinmars skateinmars force-pushed the fix/exponential-backoff-overflow branch from 8f03fe4 to 2ea58e8 Compare October 16, 2023 10:46
@skateinmars skateinmars force-pushed the fix/exponential-backoff-overflow branch from 2ea58e8 to fdf44a4 Compare October 16, 2023 11:02
@lilien1010
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants