kvcache-ai / kvcache-ai/Mooncake
[Store] Report skipped-duplicate keys to the Master so source replicas release on time
- Dominant language
- C++
- Stars
- 6.6k
- Forks
- 1.2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 312
Description
Follow-up from the #3135 review: skipped-duplicate keys never reach the Master in either direction, so their offloading tasks and source-replica (DRAM) refcounts linger until the TTL reaper — systematically delaying source release exactly when memory is tightest under the #2827 retry-storm conditions.
**Mechanism** (line numbers on #3135's head): skipped keys land in `all_bucket_keys` (`file_storage.cpp:382`), so the sweep does not NACK them, and they are not in `committed_keys`, so the complete handler does not report them either.
**Suggested shape** (credit @LujhCoconut's review): surface the skipped set out of `BatchOffload` and NACK it with the -1 sentinel so the Master releases the source replica immediately. Cross-layer (BatchOffload result surface + Master notification path), so it wants its own PR after #3135 lands.
Contributor guide
Research direction
Start with the #3135 head and file_storage.cpp:382 to trace how skipped keys enter all_bucket_keys and how BatchOffload exposes its result. Follow the Master notification path and verify that the skipped set is NACKed with the -1 sentinel, so offloading tasks and source-replica DRAM refcounts are released without waiting for the TTL reaper.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100