-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Dedupe load_bytes_with
calls
#15524
Milestone
Comments
Having reviewed the code, I think that most of #12087 should be reusable, with some exceptions. The implementation for uploads:
To resolve this, I'd suggest:
|
stuhood
added a commit
that referenced
this issue
Jun 23, 2022
As described in #15524: `remote::ByteStore::load_bytes_with` calls are not deduped currently, meaning that if multiple consumers identify a `Digest` which is missing from the local store, they might concurrently fetch it from the remote store. This is primarily an issue with `--remote-cache-eager-fetch=false`, as the laziness means that all consumers of a process output might consider whether to download it simultaneously (rather than the output always being downloaded before the process is called complete). Fixes #15524. [ci skip-build-wheels]
stuhood
added a commit
to stuhood/pants
that referenced
this issue
Jun 24, 2022
As described in pantsbuild#15524: `remote::ByteStore::load_bytes_with` calls are not deduped currently, meaning that if multiple consumers identify a `Digest` which is missing from the local store, they might concurrently fetch it from the remote store. This is primarily an issue with `--remote-cache-eager-fetch=false`, as the laziness means that all consumers of a process output might consider whether to download it simultaneously (rather than the output always being downloaded before the process is called complete). Fixes pantsbuild#15524. [ci skip-build-wheels]
stuhood
added a commit
that referenced
this issue
Jun 24, 2022
…) (#15915) As described in #15524: `remote::ByteStore::load_bytes_with` calls are not deduped currently, meaning that if multiple consumers identify a `Digest` which is missing from the local store, they might concurrently fetch it from the remote store. This is primarily an issue with `--remote-cache-eager-fetch=false`, as the laziness means that all consumers of a process output might consider whether to download it simultaneously (rather than the output always being downloaded before the process is called complete). Fixes #15524. [ci skip-build-wheels]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to fix #11331, we'll need to dedupe
load_bytes_with
calls (similar to what #12087 did forstore_bytes
).Since
Store::load_bytes_with
backfills to the local store, the deduping should likely involve a hashmap of async mutexes keyed by digest (or a cheaper equivalent) which prevent multiple callers from concurrently fetching a single digest, and re-checking the local store afterward.The text was updated successfully, but these errors were encountered: