Commit Graph

11 Commits

Author SHA1 Message Date
Hubert Zhang 42f74b407c
[TE] feat(engine): add attributes in python package for representing compile flags (#2342) 2026-06-07 23:31:17 +08:00
Copilot bc17c9b60a
Fix P2PHANDSHAKE in dual-NIC container setups via MC_RDMA_BIND_ADDRESS (#2280)
* Initial plan

* Add MC_RDMA_BIND_ADDRESS support for dual-NIC P2PHANDSHAKE setups

In dual-NIC environments where TCP and RDMA use separate interfaces,
P2PHANDSHAKE mode previously required using a single IP for both
TCP handshake and RDMA NIC paths, causing conflicts.

This change adds MC_RDMA_BIND_ADDRESS env var support:
- When set, RDMA NIC paths use the RDMA-reachable IP
- TCP P2P routing continues using the local_server_name IP
- Segment descriptors carry rdma_server_name for consistent NIC
  path construction on both sides
- P2P metadata exchange caches RDMA->TCP address mapping so
  subsequent handshakes resolve to TCP-routable addresses

* Changes before error encountered

Agent-Logs-Url: https://github.com/kvcache-ai/Mooncake/sessions/fc2826eb-a0ae-450f-b1f4-4ab94269d97a

* Apply dual-NIC (MC_RDMA_BIND_ADDRESS) support to TENT transport and update Chinese docs

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-01 16:49:58 +08:00
Aoi 0fceaee292
[Docs]: fix docs config, remove autodoc2, archive zh docs (#2218) 2026-05-26 15:29:37 +08:00
Kevin Flansburg 6ab98c7aca
[TE] Expose sendProbe via Python binding (#2088)
Exposes the existing TransferMetadata::sendProbe C++ method through the
TransferEngine pybind module as engine.send_probe(peer_server_name).
This enables SGLang's MooncakeKVManager to issue lightweight JSON-RPC
probes against peers, used to test whether a previously-blacklisted
mooncake_session_id has become reachable again so it can be removed
from the failed_sessions set.

Returns 0 on success, non-zero on failure (matching the C++ contract).
No behavior change for existing engine.* methods.

Tested:
- New Python unit tests in transfer_engine_initiator_test.py covering
  both the reachable-peer and unknown-peer cases.
- Manually validated end-to-end against SGLang's MooncakeKVManager.
2026-05-16 18:19:29 +08:00
uncharted-G 56241b8482
[TE] Support transfer in cuda stream via cudaLaunchHostFunc (#1448)
* feat(transfer-engine): support transfer on cuda

* rename async func

* only batch_transfer_on_cuda

* modify transfer_engine_py.cpp

* remove async pylib

* rename batch_transfer_write_on_cuda

* add log

* fix

* fix

* comment

* fix

* add ut

* fix

* update docs

* fix format

* fix comment

* add goto exit

* check length

---------

Co-authored-by: guohaiqing <guohaiqing02@moonshot.cn>
2026-01-28 17:15:20 +08:00
Ruoyu Qin b064a662e4
[Wheel] Remove the default buffer pre-allocation in initialize() (#1415)
* remove pre-allocate

* fix
2026-01-21 23:14:41 +08:00
Ruoyu Qin 914ed1d414
[DOC] Add batch API docs and examples for transfer engine (#1395) 2026-01-18 12:49:32 +08:00
Stary 69663d117b
[TE] Add Task Completion Latency Tracking and Detailed Metrics Reporting (#1310)
* feat(metrics): add task completion latency tracking and detailed metrics reporting

- Add histogram metric for tracking transfer task completion latency with
configurable buckets
- Record task start time in submitTransfer and calculate latency upon completion
- Enhance metrics reporting thread to include latency distribution statistics
- Add skip_metrics parameter to getBatchTransferStatus to avoid double counting
- Update task structure to include start_time field for latency calculation

Signed-off-by: staryxchen <staryxchen@tencent.com>

* feat: add metrics support for submitTransferWithNotify

Signed-off-by: staryxchen <staryxchen@tencent.com>

* refactor(metrics): improve metrics recording logic with early returns

- Replace nested if statements with early returns using goto for cleaner flow
- Add boundary checks for task_id and validate start_time before recording
- Only record metrics for COMPLETED status and reset start_time to prevent
duplicates

Signed-off-by: staryxchen <staryxchen@tencent.com>

* refactor(metrics): simplify bucket count tracking logic

- Remove conditional checks for vector bounds by ensuring prev_bucket_counts_
size matches bucket_counts
- Consolidate previous snapshot update into a single assignment

Signed-off-by: staryxchen <staryxchen@tencent.com>

* fix(metrics): conditionally enable metrics collection

- Add metrics_enabled_ flag check before collecting metrics
- Wrap metrics collection logic with flag condition to avoid unnecessary
operations
- Ensure metrics are only recorded when explicitly enabled

Signed-off-by: staryxchen <staryxchen@tencent.com>

* docs: clarify Transfer Engine metrics limitation with TENT

- Add note about MC_TE_METRIC not being supported when using Transfer Engine
TENT in deployment guide
- Add same note to Python API reference for MC_TE_METRIC environment variable

Signed-off-by: staryxchen <staryxchen@tencent.com>

---------

Signed-off-by: staryxchen <staryxchen@tencent.com>
2025-12-31 15:47:11 +08:00
Jianxin 38138f9136
[Doc] Hotfix: Remove duplicate docs (#1211) 2025-12-15 14:17:09 +08:00
Chao Lei 2d3d02a0a8
[Store] Add APIs: batch_put_from_multi_buffers and batch_get_into_multi_buffers (#929)
Co-authored-by: youxiao <youxiao@huawei.com>
2025-10-16 11:17:23 +08:00
Ruoyu Qin dedfbde5da
[Doc] Update docs for a better quick start (#814)
* add transfer engine python api

* add quick start

* add lmcache v1 integration

* update trace

* fix

* modify segment size
2025-09-06 11:16:42 +08:00