Skip to content

fix(resilience): avoid exponent overflow in capped retries - #465

Open
jackiectl2 wants to merge 2 commits into
HKUDS:mainfrom
jackiectl2:fix-capped-retry-overflow
Open

jackiectl2 wants to merge 2 commits into
HKUDS:mainfrom
jackiectl2:fix-capped-retry-overflow

Conversation

@jackiectl2

@jackiectl2 jackiectl2 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

Advance the raw exponential delay by multiplication instead of recomputing a potentially overflowing power. Capped long retry sequences can reach a later successful attempt without raising OverflowError in the backoff calculation.

Changes Made

Maintain the raw exponential delay between attempts in both retry decorators, while preserving the delay cap. Add long synchronous and asynchronous retry regressions.

Checklist

  • Changes tested locally and reviewed.
  • Unit tests added.

Validation

31 resilience tests passed, including synchronous and asynchronous regressions that fail without the fix. All repository pre-commit hooks, including the pinned Ruff checks, passed.

Full ingestion/model suite not run.

Signed-off-by: Tianlang (Jackie) Chen <305351710+jackiectl2@users.noreply.github.com>
Signed-off-by: Tianlang (Jackie) Chen <305351710+jackiectl2@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant