Mooncake/docs/source
Dao007forever 474f67852a
[TransferEngine] Bound handshake-port connect() with a timeout (#2425)
* [TransferEngine] Bound handshake-port connect() with a timeout

A blocking connect() in SocketHandShakePlugin has no deadline:
SO_RCVTIMEO does not apply to connect(), so a connect to an
unroutable address stalls for the kernel's full TCP SYN-retry
cycle, which is minutes with default tcp_syn_retries. During
rolling deployments, torn-down peers leave unroutable IPs, and
these connects run on RDMA worker threads (performPostSend ->
setupConnectionsByActive), where the stall also delays CQ polling
for transfers to healthy peers.

Connect in non-blocking mode and bound the wait with poll(),
checking SO_ERROR for the handshake verdict, then restore blocking
mode for the request/response exchange. Applies to all outbound
handshake-port RPCs (QP handshake, probe, notify, metadata
exchange). Timeout defaults to 5 seconds, tunable via
MC_HANDSHAKE_CONNECT_TIMEOUT.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* [TransferEngine] Fail immediately when poll() reports connect timeout

Review feedback: poll() returning 0 already means the timeout
expired; fail with ETIMEDOUT directly instead of looping back to
re-derive it from the clock. Also makes the wait robust to
wall-clock steps, since poll()'s own accounting decides.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 11:26:25 +08:00
..
_static [DOC] feat(docs): build documentation website for Mooncake using Sphinx (#354) 2025-05-12 23:33:18 +08:00
api-reference [Doc] finalize navigation restructure and update build/design docs (#2267) 2026-06-09 20:05:46 +08:00
community [Doc] Add goverance doc (#1352) 2026-01-09 18:53:25 -08:00
deployment docs: move Mooncake Store usage guide (#2421) 2026-06-10 18:12:23 +08:00
design [TransferEngine] Bound handshake-port connect() with a timeout (#2425) 2026-06-11 11:26:25 +08:00
getting_started [Doc] finalize navigation restructure and update build/design docs (#2267) 2026-06-09 20:05:46 +08:00
http-api-reference [Store] feat: add GetSegmentsDetail API to expose segment info via admin HTTP endpoint (#2310) 2026-06-09 10:30:09 +08:00
image [Docs] Add SSD offload benchmark results (#1835) 2026-04-13 15:52:52 +08:00
performance [Doc] finalize navigation restructure and update build/design docs (#2267) 2026-06-09 20:05:46 +08:00
python-api-reference [Store] Introduce buffer pool for zero copy interfaces (#2095) 2026-06-09 01:29:45 +08:00
troubleshooting [Store] Add lock-free MmapArena allocator for buffer mmap path (#1820) 2026-05-03 14:18:18 +08:00
zh_archive [Docs] Add build guidance for npu platform (#2325) 2026-06-04 16:21:54 +08:00
autodoc2_docstring_parser.py [DOC] feat(docs): build documentation website for Mooncake using Sphinx (#354) 2025-05-12 23:33:18 +08:00
conf.py [Docs]: fix docs config, remove autodoc2, archive zh docs (#2218) 2026-05-26 15:29:37 +08:00
index.md [Docs] [3/N] Refactor Readme: improve TE description and streamline updates (#2418) 2026-06-10 11:47:39 +08:00