perf(layers/cache): reduce per-chunk cache.delete invalidation overhead on streaming writes while preserving multi-instance visibility
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- distributed-systems, performance
Research direction
Start with core/layers/cache/src/mutation.rs:35-60 and the #8997 regression tests, especially the FS append, dropped-writer, and stale-publication cases. Investigate how cache invalidation interacts with non-append writes, shared multi-instance caches, and shard locks; the issue does not name test files or a specific design. Done means reducing per-chunk invalidation for non-append writes while preserving all stated visibility guarantees and keeping the existing regressions passing.
Written by the indexing model from the issue text.
Description
Background
(Post-v0.60.0 P2 optimization — preserve #8997 correctness invariants.)
In core/layers/cache/src/mutation.rs:35-60, Mutation<oio::Writer>::write calls self.state.mutate(&self.cache, &self.subject, ...) on every inner oio::Write::write call. Streaming a 10 GiB upload in 8 MiB chunks executes 1,280 serialized cache.delete(meta_key) operations (plus close()) while holding one of the 256 shard async locks.
While #8997 intentionally performs per-write invalidation to protect concurrent visibility on append/in-place backends and writers dropped before close(), a naive single-process active_mutations counter alone is not sufficient for shared multi-instance caches (another process could republish an intermediate pointer between writes, and other paths hashing to the same shard should not suffer unnecessary misses).
Acceptance Criteria
- Investigate a design that reduces per-chunk
cache.deleteamplification for non-append object-store writes (where nothing is externally visible beforeclose()) while strictly preserving#8997's concurrent visibility guarantees on append/in-place backends, multi-instance shared caches, and writers dropped withoutclose(). - Keep all existing
#8997FS append/drop and stale-publication regression tests passing.
This issue was jointly evaluated by both audit leaders (gemini-4-neon and gpt-6.2-astra) as a post-v0.60.0 P2 optimization.
- Dominant language
- Rust
- Stars
- 5.5k
- Forks
- 869
- Avg merge
- 8h 2m
- Merged PRs (30d)
- 862
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/opendal
-
bug(services/fs): deleting "/" removes the configured root directoryPossibly taken @xgbtxy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
apache/opendal#9635 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
fix(bindings/nodejs): reject negative and overflowing BigInt values in WriteOptions.chunk and Read/ReaderOptions.gapPossibly taken @rohan4naik claimed this today. Openbindings/nodejs bug
Difficulty 3/5 1-2 days Newbie friendliness 76/100
apache/opendal#9569 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
bug(layers/throttle): throttle streaming ReadStream bytes instead of pre-charging ReadOptions::limit upper bounds on open()Possibly taken @Xuanwo claimed this today. Openbug core
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/opendal#9567 · 1 reaction ·
Maintainers usually reply within 1 day
-
bindings/c bindings/dotnet bindings/go bindings/java bindings/python bindings/ruby core integrations/object_store release release-blocker services/azblob services/azdls services/dropbox services/gcs_grpc services/git services/hf3fs services/redis services/remotestorage services/s3 website
Difficulty 5/5 Over a week Newbie friendliness 20/100
apache/opendal#9560 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug services/dropbox services/gcs_grpc services/git services/hf3fs services/remotestorage
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/opendal#9553 · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Apich-Organization/rssn#295 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
thisnick/agent-wechat#908 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
FortoGraphy/prism-download-manager#242 ·
Maintainers usually reply within 1 day