fix(pd): harden production cutover lifecycles - #1472
Closed
sufubao wants to merge 23 commits into
Closed
Conversation
…n-cutover-readiness-20260819
…utover-readiness-20260819
Track registrations by their owning WebSocket so a stale disconnect cannot evict a replacement connection. Wake requests assigned to a replaced or disconnected node and surface the connection failure at every PD wait stage.
Supervise token forwarding, heartbeat, and per-request generation tasks while the worker waits for PD master messages. Tear down the connection when a background task fails so the master observes a disconnect instead of waiting on a silently dead request.
Route status-query and completion-notification errors through the existing failed-task cleanup path so pages and transfer handles are reclaimed. Install a fatal thread exception hook in transfer subprocesses so any unhandled daemon-thread failure is visible to process supervision.
Apply the Black 21.12b0 line-width-120 output required by the upstream pre-commit workflow. This commit is mechanical and contains no runtime changes.
Collaborator
Author
|
Superseded by three independent PRs, each based directly on upstream main and containing one fix only:
The replacement PRs intentionally omit the added unit-test changes. |
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
This PR hardens PD separation for production cutover across request admission, first-token arbitration, WebSocket ownership, and NIXL peer/transfer lifecycles.
Production failure modes addressed
Before these changes, a request could remain stuck after its assigned PD node disconnected, a stale WebSocket cleanup could remove a newer registration, and worker generation exceptions could disappear while the receive loop stayed alive. NIXL status-thread exceptions could also strand pages and transfer handles while the transfer subprocess still appeared healthy.
The resulting lifecycle guarantees are:
Inline comments document the non-obvious request-slot cancellation and NIXL failure-recovery invariants.
Audited fixes, one commit each
f6a44175fix(pd): fail requests when assigned nodes disconnect623d640dfix(pd): propagate worker background failuresfeedc43efix(pd): recover NIXL transfer task failuresEach commit includes focused regression coverage and a commit body describing its root cause and runtime behavior.
Validation
The touched files also pass the repository flake8 configuration and
git diff --check.No benchmark was run because this change is correctness and lifecycle focused.