Skip to content

exponential wait issue #526

@sbernsteen

Description

@sbernsteen

The exponential waits functions with a max value perform exponential backup followed by constant polling, exactly as designed. In my use case, I need exponential backoff up to 60 seconds followed by polling every 60 seconds forever.

The exponential wait functions compute 2^attempt_number, then return the max value (60) when 2^attempt_number exceeds 60. However, after a few days, 2^attempt_number gets very very large.

Revise the exponential wait functions to simply return max if the last returned value was max, skipping the unnecessary computation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions