Repository navigation
[Fix] linker: Renew Mooncake read leases that lapse during a load - #49043
Merged
kpham-sgl merged 5 commits intoNov 10, 2026
Merged
Conversation
alphabetc1
requested review from
huangtingwei9988 and
stmatengss
as code owners
November 7, 2026 06:52
alphabetc1
force-pushed
the
fix/linker-mooncake-lease-renewal
branch
from
November 9, 2026 17:52
882ab28 to
fc829ed
Compare
This was referenced Nov 9, 2026
Co-authored-by: Baizhou Zhang <[email protected]>
kpham-sgl
approved these changes
Nov 10, 2026
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.
Original authors: @Fridge003, @alphabetc1
Port of #48414
Fixes and guards for the Mooncake direct linker from the Kimi-K3.1 Day-0 branch (#48414), plus two fixes found while porting them.
-707only on the first read of a key; every later read of it, from the same ranged get (requests sharing a prefix) or from a concurrent layer-group read, gets-600. Both codes now count as lapsed; without it the renewal never ran on shared-prefix batches.-600again. The renew-and-retry runs up to four times with a short backoff, then fails the load as before.local_buffer_sizein the Mooncake JSON or extra config (default 16 MiB) for transports that stage GPU data through host memory, andMooncakeStorehonorsSGLANG_HICACHE_MOONCAKE_REUSE_TE.--pp-size > 1is rejected at startup.Against the raw port: the renewal sits in the ranged get of the parallel layer-group loads (#45106) instead of the per-layer loop. The branch's session cleanup after a partial start failure is dropped:
mainalready tracks sessions before starting them (#46168).Modifications
mem_cache/storage/mooncake_store/mooncake_direct_linker.py: lease renewal with bounded retries.mem_cache/storage/mooncake_store/mooncake_store.py,README.md:local_buffer_size, transfer-engine reuse switch.arg_groups/hicache_hook.py: reject--pp-size > 1with the linker.Tests
test_unified_cache_linker.py::test_range_get_*(shared keys, keys another read reported, a racing read, bounded give-up, other failures not renewed),test_mooncake_store_config.py,test_external_linker_factory.py.-600fix, about 90% of requests in shared-prefix batches were aborted (15/192 correct).-600right after a successful renewal).main(with [Fix] linker: Offload Mamba branch checkpoints on stored nodes #49042 and [Feat] linker: Support Kimi-K3.1 DSA, MLA draft and DCP pools in the direct linker #49355): 0 failed loads over the full set, GSM8K 98.18% (1295/1319) vs 98.03% without the linker.Touches the same spot of
mooncake_direct_linker.pyas #49355 (both add module-level definitions); whichever merges second needs a trivial rebase.CI States
Latest PR Test (Base): ✅ Run #42776916105
Latest PR Test (Extra): ✅ Run #42776916031
Latest PR Test (AMD ROCm 10): ❌ Run #42776916237
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent:Co-authored-by: Baizhou Zhang [email protected]
Co-authored-by: Shuwen Wang [email protected]