[Bugfix][MooncakeStore] Drop stale save metadata - #55839
anish-shanbhag wants to merge 1 commit into
Conversation
Signed-off-by: Anish Shanbhag <ashanbhag@nvidia.com>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment Once the PR is approved or has the If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban. 🚀 |
|
Closing as a duplicate of #55066, which already implements the same stale MooncakeStore save-metadata guard and additionally rolls back the request tracker's save watermark for a later retry. I found that PR during the required duplicate-work review after this draft was created. |
Problem this solves
MooncakeStore refreshes each save request's block IDs from the scheduler's current block table immediately before it pins those blocks and hands the save to the worker. The current table is authoritative: the append-only IDs in the request tracker may refer to blocks that have since been freed or reassigned.
Today,
_apply_current_save_block_ids()asserts when either the step has no connector block state or a save request is absent from that state. That turns an optional external-cache write into an engine-ending failure. This can happen when save metadata becomes stale relative to request cleanup, and it is particularly undesirable on akv_consumer: withsave_decode_cache=false, the consumer is intended to load KV, not populate the store.Current
mainalready prevents normal consumer prefill/decode paths from creating these saves. This PR adds a final defensive check at the point where save metadata is reconciled with the scheduler's authoritative block ownership. If a future or concurrent metadata path still produces a stale save, vLLM now drops only that cache write instead of terminating the serving process.Motivation and workload evidence
This failure was reproduced with a cache-heavy MiniMax M3 FP4 workload using one disaggregated prefill worker and one decode worker, TP2 on each side, Mooncake lookup enabled on the consumer, and
save_decode_cache=false.This is a reliability fix, not a performance claim. No throughput improvement is attributed to this change.
Purpose
kv_connector_block_stateor missing per-request block table as stale save metadata.warning_oncemessage with the affected request ID so the condition remains diagnosable without flooding long-running server logs._reference_save_blocks()can pin old block IDs or the worker can read from them.Using the tracker's old block IDs as a fallback would be unsafe because those IDs are deliberately superseded by the core scheduler snapshot and may already have been recycled. Skipping the optional write is therefore the conservative behavior.
Test Plan
Focused unit coverage in
tests/v1/kv_connector/unit/test_mooncake_store_scheduler.pychecks:Commands:
Test Result
ruff check: passed.ruff format --check: passed.py_compile: passed.Essential Elements of an Effective PR Description Checklist