Repository navigation
Bound a worker's input fetches with one pool across the actions it stages - #2952
Merged
MarcusSorealheis merged 4 commits intoOct 16, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
corcillo
reviewed
Oct 16, 2026
| /// slow store than the pool holds. | ||
| #[cfg(target_family = "unix")] | ||
| #[nativelink_test] | ||
| async fn download_to_directory_bounds_fetches_by_the_pool() |
Collaborator
There was a problem hiding this comment.
Request: please add a test where two or more downloads share one pool. That's the behavior this PR is for.
This test runs a single tree through a pool of 3, which a per-call limit would also pass. Something like two concurrent download_to_directory_bounded calls on one Semaphore::new(3), asserting max_in_flight() <= 3, would cover the cross-action limit. A case for 0 → 64 in RunningActionsManagerImpl::new would also be nice.
corcillo
previously approved these changes
Oct 16, 2026
…o feat/worker-download-fanout
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
A worker staging several cold actions at once opened up to 64 input fetches per directory level per action, so four actions with wide trees could hold a few hundred reads open against the CAS or the object store together. That is what a throttled store sees from a fresh worker pool.
The worker now draws every blob fetch into its store from one pool shared across the actions it stages.
max_concurrent_input_downloadson the worker config sets its size (default 64, today's per-level constant). The permit covers the fetch alone, never the directory walk under it, so a deep tree cannot deadlock the pool, and a blob already in the store is linked without one.How was this verified?
A new test stages a 40 file tree through a pool of 3 against a slow store that counts in-flight reads and asserts the peak never passes 3 while every file lands. The existing worker tests, clippy and the pinned rustfmt pass.
Risk
Low. A single action behaves as before; only a worker staging several actions at once fetches less in parallel than it did.
AI assistance
An agent drafted the change and I reviewed every line.