mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[PR #934] [CLOSED] [TransferEngine] Conditionally enable SO_REUSEADDR in handshake daemon #1912
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#1912
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/Mooncake/pull/934
Author: @staryxchen
Created: 10/16/2025
Status: ❌ Closed
Base:
main← Head:feat/add-socket-reuse-addr📝 Commits (1)
8803701feat: enable SO_REUSEADDR option in need📊 Changes
3 files changed (+23 additions, -4 deletions)
View changed files
📝
mooncake-transfer-engine/include/transfer_metadata_plugin.h(+2 -1)📝
mooncake-transfer-engine/src/transfer_metadata.cpp(+8 -2)📝
mooncake-transfer-engine/src/transfer_metadata_plugin.cpp(+13 -1)📄 Description
Summary
Enable SO_REUSEADDR for the handshake listener when appropriate to reduce bind failures during rapid restarts or legacy port reuse.
Changes
bool reuse_addr.startDaemon(..., /*reuse_addr=*/true).reuse_addrfrom envMC_LEGACY_RPC_PORT_BINDING.reuse_addris true, setSO_REUSEADDRon the listener socket.Motivation
Avoid "address already in use" errors on restarts or when legacy port binding semantics are needed, improving robustness of metadata handshake.
Behavior & Compatibility
SO_REUSEADDRis enabled only in P2P mode or whenMC_LEGACY_RPC_PORT_BINDINGis set.reuse_addrparameter.Notes
MC_LEGACY_RPC_PORT_BINDINGto force reuse in non-P2P mode.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.