Repository navigation
Conversation
aoshen02
force-pushed
the
pd-rl/mooncake-transfers
branch
from
October 4, 2026 17:04
c72b167 to
636a6c3
Compare
… promptly A pull for a transfer that P aborted, that D released or that expired now gets an error reply at once. Before, it waited out VLLM_MOONCAKE_ABORT_REQUEST_TIMEOUT and was then dropped without a reply. Each waiting pull also held one of 2 x num_workers fixed sender tasks, so a P-side abort under load wedged every later pull on D. - P serves each pull in its own task. A pull for a dropped transfer is answered at once; a live pull holds blocks only once one of num_workers senders is free, and waits for one no longer than its deadline (the abort timeout from receipt, before D's), so no write outlives D's wait. - P's send state is explicit: WAITING (request running), READY (blocks held for D) and DONE (nothing more to send). One function ends a send and frees the blocks once no transfer reads them. A state expires a timeout after P is done with the request. - A failed send ends the transfer at once instead of holding the blocks until expiry: D fails the load anyway. - D asks P to drop the transfer when a request finishes while its KV is still arriving, and frees the blocks after P's reply. - A load ends only once every producer worker has answered, so one failure cannot free blocks another worker still writes. - P no longer raises KeyError when it aborts an unscheduled request. Signed-off-by: aoshen02 <aoshen@inferact.ai> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aoshen02
force-pushed
the
pd-rl/mooncake-transfers
branch
from
October 5, 2026 02:53
636a6c3 to
3c48419
Compare
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.
Purpose
With prefill/decode disaggregation over MooncakeConnector, an abort on P could wedge D. We reproduced this on GB300 with 1P1D over RDMA under load:
pause_generation(mode="abort")on P, or clients disconnecting, left D with KV fetches stuck for more than 10 minutes, and later requests timed out.Root causes on P:
VLLM_MOONCAKE_ABORT_REQUEST_TIMEOUT(480 s), and a waiter that then found its state gone was dropped without a reply.2 × num_workersfixed tasks, and a pull waiting for its prefill held one of them. Twenty aborted transfers blocked every later pull.record_send_reqspopped the transfer of a request aborted before scheduling, with no default.This PR guarantees two things:
P send state is explicit.
SendStateis one of:WAITING: P is still running the request, so pulls wait.READY: P holds the blocks for D.DONE: nothing more will be sent._end_sendis the only place that ends a send. It frees P's blocks once no write reads them.Pull admission. Each pull gets its own task, so a pull waiting for its prefill no longer delays the others.
num_workerssenders is free. Until then it can still expire or be aborted.Failed sends end the transfer at once, since D fails the load anyway. Before, they held P's blocks until expiry.
D side.
Stacked on vllm-project#59625 (Mooncake sleep mode); this fork PR targets its rebased branch.
Test Plan
test_send_state_answers_every_pull_oncedrives 18 orders of claim, ready, pull, abort, release, expiry, abort-all, a failing send, a write in flight, a busy sender pool, a deadline and a mixed batch. Each pull must be answered exactly once, and P's blocks must be freed exactly when nothing reads them.test_load_ends_once_every_producer_answeredcovers the producer fan-out.Test Result
The lifecycle cases that clear the cache are fixed in the follow-up PR. The full 27-case matrix passes with both PRs.
Python ≥ 3.10.9 is assumed, for the asyncio semaphore cancellation fix (gh-90155).
🤖 Generated with Claude Code