Skip to content

Fix random_exponential backoff start and returned wait - #556

Merged
maennchen merged 1 commit into
mainfrom
fix-random-exponential-backoff
Oct 3, 2026
Merged

maennchen merged 1 commit into
mainfrom
fix-random-exponential-backoff

Conversation

@maennchen

Copy link
Copy Markdown
Member

The random_exponential backoff started with the state {Lower, Lower} instead of {Min, Lower}, as in db_connection. Because of this, the first retry came after 10 to 30 seconds with the defaults, not after 1 to 3 seconds. The function also returned a second random value instead of the wait it stored as the previous wait. Thus each new range used a wait that did not occur.

This change makes both match db_connection. A new test checks that the first wait is between backoff_min and three times backoff_min.

Fixes #555

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@maennchen
maennchen merged commit 1cce6fa into main Oct 3, 2026
28 checks passed
@maennchen
maennchen deleted the fix-random-exponential-backoff branch October 3, 2026 11:27
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.

random_exponential backoff never waits less than backoff_max div 3, whatever backoff_min is

1 participant