mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #5037] [RFC]: [Store] Shared-DFS to MEMORY promotion for queued KV prefetch #1275
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#1275
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lihenga on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/5037
Changes proposed
Extend Mooncake's existing promotion machinery to support shared-DFS objects promoted into store-managed MEMORY for SGLang waiting-queue KV prefetch. This RFC fixes the backend contract and failure/lifetime rules before the implementation is upstreamed.
Cross-project integration and PR sequence: SGLang companion RFC #47031.
The implementation is deliberately the last feature phase, after independent correctness, I/O, health/recovery, and ReadPlan work. Discussing the contract now avoids upstreaming a request-owned pinned-arena prefetch architecture and then replacing it.
Relationship to existing work
Proposed API boundary
The downstream prototype exposes a batch trigger:
We propose the following contract regardless of the final spelling:
The existing prefetch-on-exist trigger remains useful for SSD. An explicit shared-DFS trigger should reuse the same accepted promotion infrastructure and access/tenant rules. We are not proposing a mandatory router protocol, new standalone prefetch service, or a second allocator.
Execution and publication
If source identity changed while reading/staging, publication must either prove the staged version still matches the registered object or fail safely. Reusing a bucket number or a target address is not proof of identity.
Target lifetime: deadline is not writer completion
The latest downstream prototype includes a correction for this specific failure:
The proposed invariant is strict: once an executor can write a target, neither task TTL nor an RPC timeout permits target reuse until that writer is drained or otherwise fenced from the allocation. A failure path must also retain staging while native I/O can still access it.
The prototype reads DFS before target registration/allocation and conservatively retains an issued prefetch target until terminal notification. This prevents unsafe timeout reuse but has a known liveness cost: lost executors/notifications can strand capacity. We do not claim automatic recovery from that case. Any automatic reclamation must demonstrate owner-liveness/fencing or actual drain; an elapsed-time-only reaper is insufficient.
This is a merge gate and design question for the shared promotion machinery, not a reason to silently disable expiry checks for unrelated reads.
Resource, deduplication, and cancellation rules
Upstream implementation split
Independent backend work precedes this feature:
The old dedicated-arena/session-prefetch path is reference material, not a prerequisite to merge. Deployment-specific increases to staging capacity, read concurrency or fixed timeouts are not bundled into the feature.
Validation gates
These are required checks for the eventual upstream patch, not completed test claims:
Reference and implementation status
Prototype: lihenga/mooncake-das #115, inspected head 12d4eb24a88139f40c0c901b00f3c4dded63df45, consisting of the initial promotion change plus the target-lifetime correction. Consumer: lihenga/sglang-das #43, inspected head 234264a11f0b7393d066f9f53f733d2989cd20e2.
These are downstream prototypes, not an apply-ready current-main patch or a claim of final model/performance qualification. Historical test reports apply only to their recorded source revisions and scope. No new tests were run while preparing this RFC.
Feedback requested
Before submitting a new issue
AI assistance disclosure: Codex assisted with source/PR comparison and RFC drafting. Human review and the validation gates above remain required.
@github-actions[bot] commented on GitHub (Oct 28, 2026):
Thanks for opening this issue, @lihenga!
117809381A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide