Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
b7r6
force-pushed
the
fork/upstream-fix-sched-try-subscribe-live
branch
from
October 3, 2026 21:32
50b675e to
782f9d9
Compare
`try_subscribe` stopped at the first exact unique-qualifier match, even when that match was a completed record. The unique-qualifier index retains completed records alongside any live successor, and the backend does not order results by state, so a retained completed record could be returned ahead of a joinable live one — forcing an unnecessary recreate and a new operation instead of joining the live successor. Scan every exact match and prefer a joinable (neither finished nor abandoned) candidate, keeping the first exact match only as a fallback. This is the selection half of finding N7. The atomic qualifier->live-op claim (two concurrent same-qualifier submissions can still both create an operation) needs a store primitive that does not exist today (a compare-and-set on the shared qualifier key); that is tracked separately. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit c8a7b7b)
b7r6
force-pushed
the
fork/upstream-fix-sched-try-subscribe-live
branch
from
October 3, 2026 21:40
782f9d9 to
c4f37fa
Compare
This branch was successfully 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.
What and why
try_subscribeinstore_awaited_action_db.rsstopped at the first exact unique-qualifier match, even when that match was a completed record. The unique-qualifier index retains completed records alongside any live successor, and the backend does not order results by state, so a retained completed record could be returned ahead of a joinable live one — forcing an unnecessary recreate and a brand-new operation instead of joining the live successor (duplicate scheduling of the same action). This change scans every exact match and prefers a joinable (neither finished nor abandoned) candidate, keeping the first exact match only as a fallback. Note: this is the selection half of the issue; a fully atomic qualifier-to-live-op claim (two concurrent same-qualifier submissions) needs a compare-and-set store primitive that does not exist today and is out of scope here.How was this verified?
Found via our fleet's scheduler consistency chaos suite. New regression coverage in
nativelink-scheduler/tests/store_awaited_action_db_test.rs(~170 lines) constructs a retained completed record ahead of a live successor for the same qualifier and asserts the live one is selected — fails on currentmain, passes with the fix.cargo check -p nativelink-scheduler --testspasses on this branch.Risk
Low. A 27-line change to candidate selection in one function; when only one candidate exists, behavior is unchanged, and the first-match fallback preserves today's behavior when no joinable candidate is found.
AI assistance
Yes. The fix was developed on our fleet-hardened fork with AI assistance (chaos-test triage and patch authoring), and an agent curated and rebased it onto current
mainfor this PR. A human reviewed the diff before opening.