-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[ENH] Add dedupe closure to storage #5141
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
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
Summary: 1 successful workflow, 1 pending workflow
Last updated: 2025-07-24 18:55:27 UTC |
&self, | ||
key: &str, | ||
options: GetOptions, | ||
// TODO: remove is_parallel and move it into GetOptions, refactor all callers |
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.
will do in another PR
let (output_tx, output_rx) = tokio::sync::oneshot::channel(); | ||
// Add the new sender to the existing request. | ||
inflight_req.senders.push(output_tx); | ||
drop(requests); |
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.
I tried to structure all of this to avoid manual drops() but I actually think its cleaner this way
This comment was marked as outdated.
This comment was marked as outdated.
|
|
Add Deduplicated Async Closure API (fetch) to Storage Layer This PR introduces a new deduplicated request mechanism in the storage layer by adding a fetch API that accepts an async closure, enabling deduplication with per-request closures instead of shared futures. The deduplication logic has been rethought to avoid undefined behavior from cross-runtime use, and the storage interface is updated throughout the codebase (including in blockstore) to support closure-based deduplication. Additional cleanups and minor lock/naming improvements accompany the new API, and extensive integration testing validates correct deduplication behavior. Key Changes• Introduces Storage::fetch() API to all major storage backends, supporting deduplicated concurrent requests using an async closure. Affected Areas• rust/storage/src/admissioncontrolleds3.rs This summary was automatically generated by @propel-code-bot |
## Description of changes _Summarize the changes made by this PR._ - Adds a dedupe closure API to the storage interface under `fetch` - Fetch allows providing an async closure to be deduplicated - This changes off of a Shared future for deduplication, since the dispatcher runtimes and main runtime may share that future, leading to undefined behavior. ## Test plan _How are these changes tested?_ Existing tests cover this - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Migration plan _Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?_ ## Observability plan _What is the plan to instrument and monitor this change?_ Existing telemetry monitors this change ## Documentation Changes None
Description of changes
Summarize the changes made by this PR.
fetch
Test plan
How are these changes tested?
Existing tests cover this
pytest
for python,yarn test
for js,cargo test
for rustMigration plan
Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?
Observability plan
What is the plan to instrument and monitor this change?
Existing telemetry monitors this change
Documentation Changes
None