Repository navigation
fix(stats): retry transient query failures - #50205
Merged
Merged
Conversation
adamdotdevin
enabled auto-merge (squash)
September 20, 2026 17:25
rldona
pushed a commit
to rldona/FlupCode
that referenced
this pull request
Sep 24, 2026
Jovan1666
pushed a commit
to Jovan1666/opencode
that referenced
this pull request
Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
The full production backfill encountered an R2 SQL
40005query timeout after pagination was deployed. One transient failure discarded all completed queries in the pass.Type of change
What does this PR do?
Retry the failing page up to twice, with exponential backoff, for R2 query timeouts, HTTP 429, and HTTP 5xx responses. Preserve already-read pages. Syntax, authorization, and unpaginated row-limit errors still fail immediately.
How did you verify your code works?
All 29 stats-core tests pass, including a second-page timeout that recovers without duplicating earlier rows, bounded retry exhaustion, and immediate failure for permanent errors. Stats core/server and repository-wide typechecks plus
git diff --checkpass. A fresh production replay of the historical query succeeded with 6,736 unique rows after the earlier timeout and HTTP 500 failures.Checklist