Repository navigation
Worker: a stalled scheduler connection reconnects instead of leaving the worker evicted and idle #2856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
amankrx
merged 10 commits into
TraceMachina:main
from
amankrx:fix/worker-scheduler-stall
Oct 1, 2026
Merged
Worker: a stalled scheduler connection reconnects instead of leaving the worker evicted and idle #2856
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
34e86e7
Worker: no scheduler call awaited in the run loop, a deadline on keep…
amankrx f12ed2e
Worker: the GoingAway calls on shutdown carry the same deadline
amankrx 58436ff
Worker: the layout CI's rustfmt asks for
amankrx a101923
Merge branch 'main' into fix/worker-scheduler-stall
amankrx 2ce890b
Keep the scheduler stream flowing: ordered processing off the reader,…
amankrx 638eaae
Qualify Code in the worker API server test
amankrx 652e341
Box the action future before the launch closure
amankrx 0776198
Box the action chain inside the action closure
amankrx f3636b3
Raise the binary's recursion limit for the worker's action future
amankrx 1d79d28
Use try_update for the filesystem store generation counter
amankrx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Liveness still waits behind processing. Moving the reads off the processor fixes the flow-control stall, but the worker's liveness is still refreshed only when a message is processed (the keepalive handling and
touch_livenessrun in the loop below). A keepalive that arrives on time therefore waits behind this worker's queued results before it counts.During a backend latency spike (a Redis failover, a slow
update_actionwrite), this queue grows the same way on every worker connected to the scheduler. Once it's longer thanworker_timeout_s(10 s by default), the scheduler evicts workers whose keepalives it has already received, and requeues all their actions onto the same slow scheduler.Suggest recording "last heard" in this reader task on receipt (an atomic timestamp the timeout sweep consults), or handling
KeepAliveRequeston a fast path here, so liveness reflects the connection rather than the backend. This could be a follow-up, but it's the remaining way a healthy worker gets evicted under load.