fix(file-search): back off indexing retries after database timeouts - #8189
Merged
waleedlatif1 merged 1 commit intoSep 23, 2026
Merged
Conversation
A statement, lock, or transaction timeout while indexing a workspace file means the database had no capacity for the build, not that the file is bad. The task retried it within seconds, so all three attempts landed in the same slow window and the revision was marked failed for good. Capacity timeouts now retry after about 2, 4, 8, 16 and 30 minutes (six attempts); other failures keep three attempts with the default delays.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
waleedlatif1
deleted the
fix/workspace-file-search-statement-timeout
branch
September 23, 2026 06:20
This branch was previously deployed
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.
Summary
failedfor good, with an alert for each runcatchErrornow sorts failures into two kinds. Statement, lock, and transaction timeouts count as missing database capacity and back off about 2, 4, 8, 16, and 30 min (with jitter), six attempts in all, about an hour total. That is well inside the 6 h stale-dispatch window, and each attempt still starts a fresh fenced build. Every other failure keeps the old behavior: three attempts with the runner's default delaysType of Change
Testing
catchErrorwiringcatchError, going back tomaxAttempts: 3, dropping the capacity branch, shrinking the base delay to 1 s, and removing the capacity attempt ceiling each turn at least one test redvitest run lib/workspace-files/search background/workspace-file-search(188 passing),type-check,lint,check:audits(47),docs-manifest:checkChecklist