fix(builder): abandon the load operation when a resource load times out - #1553
Draft
joaodinissf wants to merge 1 commit into
Draft
joaodinissf wants to merge 1 commit into
joaodinissf wants to merge 1 commit into
Conversation
joaodinissf
added a commit
that referenced
this pull request
Sep 26, 2026
formal/README.md describes the method, target status, models and how to reproduce. formal/BUGS.md catalogues 51 findings (49 confirmed, 1 plausible, 1 refuted) plus 9 observations, all verified by three independent skeptics, with traces, test status, fix plans, a proposed fix-PR sequence and links to the fix PRs opened so far (#1550, #1551, #1552, #1553). REPORT.md is the chronological log of rounds 1-2. The patches are reference fixes used to show each disabled test turns green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rubenporras
reviewed
Sep 28, 2026
| if (result != null) { | ||
| toProcess--; | ||
| consecutiveTimeouts = 0; | ||
| } else if (++consecutiveTimeouts >= MAX_CONSECUTIVE_TIMEOUTS) { |
Member
There was a problem hiding this comment.
I do not get the point of this PR, could we not just increase the timeout if we want to try longer?
ParallelLoadOperation.next() decremented the outstanding-result counter even when poll() timed out. From then on the counter was one short of the results still coming, so the builder either aborted the cluster as if it had been cancelled or, in writeResources, left some other resource silently unindexed. A longer timeout makes this rarer but cannot prevent it. Decrement only when a result is delivered. A timeout cannot be attributed to a URI, and a load that never finishes would otherwise keep the builder waiting forever, so a timeout now cancels the whole operation and says so. writeResources treats that like the linking phase already did on master: it cancels the build instead of dropping the remaining resources, so the next build is a full build rather than one with a stale index. The check is a public predicate, isAbandonedByTimeout, so that it can be tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joaodinissf
force-pushed
the
fix/parallel-loader-timeout-count
branch
from
September 28, 2026 19:15
4282d4c to
95ccf71
Compare
joaodinissf
added a commit
that referenced
this pull request
Sep 29, 2026
formal/README.md describes the method, target status, models and how to reproduce. formal/BUGS.md catalogues 51 findings (49 confirmed, 1 plausible, 1 refuted) plus 9 observations, all verified by three independent skeptics, with traces, test status, fix plans, a proposed fix-PR sequence and links to the fix PRs opened so far (#1550, #1551, #1552, #1553). REPORT.md is the chronological log of rounds 1-2. The patches are reference fixes used to show each disabled test turns green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been 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.
Why the change
After a resource load times out, the builder silently leaves some other resource out of the index; this makes a timeout cancel the build visibly instead.
Special things to note
Change outline
The owed-result counter in
ParallelLoadOperation.next():What the builder does after a timeout:
Tests (
ParallelResourceLoaderTest, each run against an unbounded queue and production's synchronous hand-off):timeoutAbandonsEveryOutstandingLoad: one timeout ends the operation and queued loads never start. Fails on master.failedLoadDoesNotAbandonTheOperation: an ordinary load failure keeps the other loads.resultWithinTimeoutIsDelivered: sanity check.BuilderLoadTimeoutTest: only a timeout with nothing left to load counts as abandonment; a timeout with loads left, an ordinary load failure and other wrapped exceptions do not.🤖 Generated with Claude Code