[Bugfix][TransferEngine] Honor retry hints in RDMA request preselection - #4023
Draft
adenzhou1350 wants to merge 1 commit into
Draft
[Bugfix][TransferEngine] Honor retry hints in RDMA request preselection#4023adenzhou1350 wants to merge 1 commit into
adenzhou1350 wants to merge 1 commit into
Conversation
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.
Description
TransferEnginePy::transferSync()retries failed transfers across availablelocal RDMA contexts by setting
TransferRequest::advise_retry_cntto the outerretry index. The RDMA request-wide device-selection fast path did not forward
that hint, so a request contained in one registered buffer could preselect the
retry-zero preferred HCA again and bypass the per-slice selection path that
already honors the hint.
Forward
request.advise_retry_cntto the request-wideselectDevice()call.The default value is zero, so first-attempt selection is unchanged. Requests
that cannot be selected as a whole still use the existing per-slice fallback
behavior.
This is adjacent to the failover work in #2959 / #2960, but narrower: it
restores retry-index selection for an active request-wide preselected context.
It is also complementary to open PR #3696, which adds rail cooldown,
redispatch, chaos coverage, and inactive-context safeguards but leaves the
active request-wide
selectDevice()call at retry zero. A merge-tree checkagainst the observed #3696 head is clean.
It is also complementary to open PR #2524: that PR advances retry hints in the
Python batch wrapper but does not forward the hint through this request-wide
RDMA source-device selection. This change does not modify #2524's batch retry
lifecycle, endpoint recovery, inactive-context handling, or metadata
publication.
vLLM's Mooncake KV connector and SGLang's primary KV/weight transfer paths use
batch transfer APIs. On current Mooncake main those APIs keep
advise_retry_cntat zero, so this PR alone does not claim a framework KVbatch-failover improvement. If #2524 (or an equivalent producer fix) lands,
this consumer fix is required for a whole-buffer classic RDMA request to honor
the advanced hint instead of reusing retry-zero preselection.
There is also a current single-transfer consumer: SGLang multimodal-generation
disaggregation
calls Mooncake
transfer_sync_write()when pushing a staged payload to a peer.That path reaches this fix when classic RDMA has multiple local contexts. This
is source-level reachability only; no end-to-end SGLang failover or performance
result is claimed here.
Module
mooncake-transfer-engine)Type of Change
How Has This Been Tested?
The focused unit test uses two bare test RDMA contexts and distinct lkeys. With
advise_retry_cnt = 2, the request-wide fast path must select the fallbackcontext's lkey.
RequestWideSelectionHonorsRetryHintfails, selecting preferred lkey 11instead of fallback lkey 22.
origin/mainmerge-tree and PR-scoped pre-commit hooks pass.combined CPU build succeeds and the same focused suite passes 5/5.
topology_test13/13,rdma_endpoint_state_test8/8, andworker_pool_rail_state_test15/15.transferSyncfailover and data-integrity test. Thisremains pending; this Draft makes no live-RDMA or performance claim.
Checklist
formatter.
behavior are unchanged.
retry semantics.
AI Assistance Disclosure
Codex helped trace the retry path, prepare the focused change and regression
test, find and compare adjacent upstream work, and run paired candidate/control
validation. The human submitter will review every changed line before
publication.
Claim boundary
This is a correctness/reliability fix for classic RDMA request-wide local-device
preselection. It does not claim higher healthy-path throughput, end-to-end
failover success, or results for EFA, CXI, UB, TENT, the batch APIs, GPU/GDR, or
production workloads.