[Bugfix][EPD] Fix Mooncake transfer lifecycle cleanup - #8
Open
jiaran-king wants to merge 1 commit into
Open
Conversation
Wait for every sharded reservation and write before cleanup, attempt cancellation on every shard and retain tombstones after RPC failures, and unregister the producer staging pool on shutdown. Assisted-by: OpenAI Codex Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
jiaran-king
force-pushed
the
codex/fix-mooncake-failure-paths
branch
from
August 29, 2026 05:09
78bb4e9 to
12d3476
Compare
jiaran-king
marked this pull request as draft
August 29, 2026 06:15
jiaran-king
marked this pull request as ready for review
August 29, 2026 06:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
The Mooncake connector fans reservation and write work out across consumer TP shards. Previously, the result loop stopped at the first exception. Other shard operations could still be running while source staging memory or destination allocations were released, and successful reservations from the same fan-out could remain allocated until lease expiry.
A cancel RPC can also fail after some remote shards have already processed the cancellation. Removing the scheduler tombstone in that case lets a queued late ready event recreate a transfer whose remote state is already partially released.
Tests
.venv/bin/python -m pytest -q tests/v1/ec_connector/unit/test_ec_mooncake_connector.py(49 passed).venv/bin/python -m pytest -q tests/v1/ec_connector/unit/test_worker_ec_connector.py(6 passed)pre-commit run ruff-check --files vllm/distributed/ec_transfer/ec_connector/mooncake_ec_connector.py tests/v1/ec_connector/unit/test_ec_mooncake_connector.pypre-commit run ruff-format --files vllm/distributed/ec_transfer/ec_connector/mooncake_ec_connector.py tests/v1/ec_connector/unit/test_ec_mooncake_connector.pyThe added fault-injection coverage verifies partial TP-shard reservation failure, partial TP-shard write failure, continued cancellation after a shard RPC failure, cancel-RPC failure with a late ready event, and producer-pool unregistration at shutdown.
Duplicate-work check
I searched the open PRs in
vllm-project/vllmandkvcache-ai/vllmfor the same Mooncake shard-failure and reservation-failure fixes and found no existing implementation.AI assistance
AI assistance was used to trace the failure paths, prepare the implementation and tests, and run the checks above. The human submitter reviewed the change and its test evidence before submission.