Repository navigation
[Doc] Update TCP connection pool docs for the default-on flip - #4473
Merged
Merged
Conversation
The pool has been enabled by default since kvcache-ai#3569, but the docs still present it as opt-in and the troubleshooting guide's "known limitations" describe the removed dynamic pool (cleanupIdleConnections, pool_mutex_), not the lane-based implementation the flag now selects. - index.md: document the default-on behavior, the bounded per-peer lanes, the clean-exchange reuse rule, and the 0/false/no opt-out. - troubleshooting.md: reframe the ephemeral-port fix around the default, and replace the stale limitations with the lane implementation's actual caveats (no idle reaping, no keepalive probe on reuse, dirty-socket discard + lane cooldown retry). Verified with sphinx html build (no warnings on either page) and pre-commit run --files on both files.
he-yufeng
requested review from
ShangmingCai,
UNIDY2002,
alogfans,
staryxchen,
stmatengss and
ykwd
as code owners
October 5, 2026 03:06
11 of 31 tasks
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
The TCP connection pool has been enabled by default since #3569, but the docs never caught up:
design/transfer-engine/index.mdstill presentsMC_TCP_ENABLE_CONNECTION_POOLas an opt-in flag.troubleshooting/troubleshooting.mdtells operators toexport MC_TCP_ENABLE_CONNECTION_POOL=1(now a no-op), and its "two known limitations" describe the removed dynamic pool (cleanupIdleConnections(),pool_mutex_). The flag has routed to the lane-based implementation since the lanes landed, so those limitations no longer describe any shipping code.This PR rewrites both spots against the current implementation: default-on with
0/false/noas opt-out, bounded per-peer lanes (MC_TCP_LANES_PER_PEER, default 4), reuse only after a cleanly completed exchange, dirty sockets closed and re-established. The troubleshooting entry keeps the old-builds note (=1for pre-flip releases) and replaces the stale limitations with the lane caveats that actually apply: no idle reaping (up to lanes-per-peer sockets held per peer for process lifetime), no keepalive probe before reuse (a middlebox-dropped idle connection stalls the next transfer instead of failing fast), and dirty-socket discard with lane cooldown retry.Surfaced while reviewing #4464; the behavioral half of that PR is the already-merged #3569.
Module
mooncake-transfer-engine)mooncake-store)mooncake-conductor)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Docs-only change. Claims were verified against
upstream/main(0d1a8040): the env parsing inTcpTransport::TcpTransport()(0/false/noopt-out, default on), lane defaults in the same constructor, dirty-socket handling inhandleLaneTerminal, absence of an idle reaper orSO_KEEPALIVEin the lane/session code, and session keep-open behavior intcp_transport_session_impl.h.Test commands:
Test results:
Sphinx HTML build completed with no warnings on either edited page; all applicable pre-commit hooks pass (codespell, end-of-files, etc.).
Checklist
./scripts/code_format.shAI Assistance Disclosure
Drafted with AI assistance (Kimi Code): the tool read the current lane implementation and traced which doc statements no longer match shipping code. I reviewed every changed line against the sources cited above and can defend the change end-to-end.