Commit Graph

136 Commits

Author SHA1 Message Date
fatSheep 7d0978b9ca
[Store] Add Upsert API for in-place object updates (#1662)
Co-authored-by: fatSheep <tzh2005t@gmail.com>
2026-04-03 10:24:37 +08:00
EkiRui 830d84127a
[Store] support resolving master RPC address from interface (#1784)
* [Store] support resolving master RPC address from interface

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
2026-04-01 12:39:05 +08:00
Cruz Zhao 9351a54014
fix: correct TP zero-copy put semantics (#1685)
* fix: correct TP zero-copy put semantics

* fix: apply clang-format to store binding

* fix: default batch TP-from results to errors

* fix: return success for batch TP put-from

Ensure batch_put_tensor_with_tp_impl reports zero on fully successful shard writes so TP zero-copy Python tests don't fail with false INVALID_PARAMS results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* tests: align TP zero-copy benchmark with get API signature

Keep the TP zero-copy benchmark focused on put-from semantics by removing an unsupported split_dim argument from batch_get_tensor_with_tp_into.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* trigger ci

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Xuchun Shang <xuchun.shang@linux.alibaba.com>
2026-04-01 09:45:53 +08:00
lujh 6105f9cda8
[Store] fix gmock bug and add batch remove API (#1756) 2026-03-31 16:55:41 +08:00
fatSheep 7113245ee4
[DOC] Add troubleshooting for RDMA MKEY resource exhaustion (#1765) 2026-03-29 16:14:38 +08:00
Mike Chen 8f39661a31
[DOC] add missing steps to efa transport readme (#1759)
---------

Co-authored-by: Bobby <bobby@Bobbys-MacBook-Air.local>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-28 11:31:28 +08:00
Yufeng He 4c19802458
[Store] Add hard pin mechanism for eviction-protected objects (#1728)
* [Store] Add hard pin mechanism for eviction-protected objects

Objects created with ReplicateConfig.with_hard_pin=true are never
evicted by the eviction policy, providing guaranteed persistence
for model weights in RL and model management workloads.

Changes:
- ReplicateConfig: add with_hard_pin field (default false)
- ObjectMetadata: add hard_pinned boolean, set at creation via PutStart
- BatchEvict: skip hard-pinned objects in all eviction passes
- Serialization: persist hard_pinned in snapshots (backward compatible
  with old format that lacks the field)
- Tests: verify hard-pinned objects survive eviction, coexist with
  soft pin, and can still be explicitly removed
2026-03-25 17:41:40 +08:00
Xuanlin_Mi d7f82d81e4
[Store] Support duration units for master TTL flags (#1684) 2026-03-20 15:49:19 +08:00
Yineng Zhang 79e0ae1140
docs: add TorchSpec in Mooncake README (#1709) 2026-03-20 10:49:26 +08:00
zhangzuo21 f40407eb59
[Docs] Add SSD offload documentation (#1647) 2026-03-19 15:37:59 +08:00
1180300720 22ecbd794e
[CI] update ascend ci and docs (#1683)
Co-authored-by: ZhaoBaiwei <zhaobaiwei@huawei.com>
2026-03-17 20:34:42 +08:00
Feng Ren f55a59f83e
[Bench] SSD benchmarks based on Mooncake Trace (#1613) 2026-03-17 10:43:23 +08:00
Cruz Zhao 0c310237d7
[Store] put tensor zero copy (#1480)
---------

Signed-off-by: Cruz Zhao <CruzZhao@linux.alibaba.com>
2026-03-13 22:59:43 +08:00
Copilot 9bd773e6fe
[EP] Move EP/PG wheel-building logic from build_wheel.sh into CMake (#1616) 2026-03-12 22:24:12 +08:00
yizheng 5fe8e21e7c
[Store] Implement Metadata Persistence and Recovery for Master Service (#1431) 2026-03-02 11:20:33 +08:00
fatSheep 9e4e9490b2
[Doc]: add allocation strategy documentation with user guidance (#1577)
* docs: add allocation strategy documentation with user guidance

Document the three built-in allocation strategies (random, free_ratio_first, cxl)
with a user-facing comparison table, selection guidance, and detailed descriptions.

* Update docs/source/design/mooncake-store.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update docs/source/design/mooncake-store.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: fatSheep <tzh2005t@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-02 10:50:31 +08:00
Yineng Zhang 8f054b6e5f
[Doc] update README (#1575) 2026-02-28 10:28:07 +08:00
Yineng Zhang b843433b04
[DOC] add TorchSpec in Mooncake README (#1574) 2026-02-28 09:53:31 +08:00
Feng Ren c0a1e6570d
[TE] Implement TCP connection pooling to reduce connection overhead (#1508)
* [TE] Implement TCP connection pooling to reduce connection overhead

* fix correctness

* Code reformat

* Fix according to review comments

* Retrigger CI

* Fix connection pool issues

* default disable connection pool to ensure stability
2026-02-27 09:56:34 +08:00
Yineng Zhang b1fbcd182d
Update README with recent project updates (#1541) 2026-02-13 13:02:02 +08:00
fatSheep 330863e389
[Store] Introduce Free-Ratio-First Allocation Strategy to Improve Convergence (#1511)
Co-authored-by: fatSheep <tzh2005t@gmail.com>
Co-authored-by: sinpo828 <sinpo828@outlook.com>
2026-02-13 11:48:09 +08:00
ascend-direct-dev 3e67c9e443
[TE] change ascend direct transport docs & fix async transfer disconnect bug 2026-02-12 14:20:02 +08:00
youxiao 38d2fbb18b change ascend direct transport docs 2026-02-11 16:53:55 +08:00
王鹤男 3cdbbdc6d0
[TE] Support TCP fallback in EFA build and improve EFA documentation (#1523)
When building with USE_EFA=ON, auto_discover is disabled to prevent
RDMA transport installation (QP creation fails on EFA devices). This
means TCP transport is also not installed automatically. Add explicit
TCP transport installation for non-EFA protocols in the EFA build path.

Documentation changes:
- build.md: Add USE_EFA option and clarify USE_CUDA default/purpose
- supported-protocols.md: Add EFA as a supported protocol
- efa_transport.md: Add USE_CUDA=ON to build command, document GPU
  memory requirement

Co-authored-by: whn09 <whn09@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Teng Ma <teng-ma@linux.alibaba.com>
2026-02-11 10:50:35 +08:00
Shangming Cai 1f61d40c7d
[Doc] Document missing USE_MNNVL compile option (#1525)
* Document missing USE_MNNVL compile option

Add documentation for Multi-Node NVLink transport option.

* upd
2026-02-10 01:05:50 +08:00
yejj 8c60e6c4cb
[docs] add conductor indexer api design doc (#1416)
* add indexer api design doc

* remove some api & add explain info for tiered storage

* rename tired storage level name

* add overview architecture

* define the input of  indexer kvevent

* add example for indexer api output

* fix some issue from code reviews

* add explain for different medium

* delete the confusing note

* add more Introduction for indexer output value

* change some code based on the code review

* use medium name directly

* fix some format problem

* support multi-tenant & cache salt and  rename engine_name
2026-02-10 00:06:52 +08:00
王鹤男 4136d2b73b
[TE] Add AWS EFA transport using libfabric (#1509)
* [TE] Add AWS EFA transport using libfabric

Add EfaTransport as a new transport backend for AWS Elastic Fabric
Adapter (EFA) devices.  EFA exposes RDMA-like NICs but does not support
the full ibverbs QP API, so this transport uses libfabric's FI_EP_RDM
(Reliable Datagram Message) endpoint type instead.

Architecture (per EFA device):
  EfaTransport → EfaContext → EfaEndPoint
  - EfaContext: owns fabric/domain/AV/CQ/MR resources
  - EfaEndPoint: one RDM endpoint per peer, with address-vector addressing
  - Dedicated CQ poller thread per device for responsive completion draining

Key design decisions:
  - FI_THREAD_SAFE requested from provider; per-endpoint spinlock on
    fi_write as safety net for concurrent submission threads
  - Atomic CAS reservation of CQ and WR capacity before posting fi_write
    to prevent CQ overflow under high concurrency
  - CQ error path drains all queued errors (fi_cq_readerr loop) before
    returning, per libfabric semantics
  - Retry-with-backoff on CQ/WR full instead of immediate slice failure
  - Thread-safe endpoint creation via atomic getOrInsert to prevent
    duplicate endpoints for the same peer
  - Handshake exchanges EFA endpoint addresses via dedicated efa_addr
    field in HandShakeDesc

Build: cmake -DUSE_EFA=ON (requires libfabric from AWS EFA installer)
Tested on p6-b200.48xlarge (8 EFA devices, 8×400 Gbps): 59.72 GB/s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [TE] Add EFA unit tests and bench tool support

Add efa_transport_test with 5 test cases:
  - InstallTransport: verify EFA transport installation
  - LoopbackWrite: basic loopback write operation
  - WriteAndRead: write then read with data integrity check
  - MultiWrite: batch write (16 requests)
  - StressMultipleBatches: stress test (20 batches × 8 requests)

Add --protocol=efa support to transfer_engine_bench with manual
topology discovery (EFA needs explicit discover() since
TransferEngine(false) skips auto-discovery).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Docs] Add EFA transport documentation

Add comprehensive EFA transport documentation covering:
  - Prerequisites and build instructions
  - Usage with vLLM (prefill/decode disaggregation)
  - Unit test descriptions and environment variables
  - Benchmark results on p6-b200.48xlarge: 59.72 GB/s (EFA) vs
    9.5 GB/s (TCP iperf3) vs 0.11 GB/s (Mooncake TCP transport)
  - EFA vs RoCE RDMA comparison table
  - Thread safety design notes
  - Troubleshooting guide

Add EfaTransport to the transfer-engine index toctree and supported
transport lists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [TE] Address PR review: ifdef EFA fields, use find_package for libfabric

- Wrap efa_addr in HandShakeDesc with #ifdef USE_EFA in transfer_metadata.h
- Wrap efa_addr serialization/deserialization with #ifdef USE_EFA in transfer_metadata.cpp
- Replace hardcoded /opt/amazon/efa paths with find_path/find_library in common.cmake
- Remove redundant hardcoded EFA paths from all CMakeLists.txt files
- Fix git clone URL in efa-transport.md to use official kvcache-ai/Mooncake repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Docs] Update EFA benchmark results with tuned parameters (170 GB/s)

Update benchmark documentation with comprehensive parameter tuning results
from cross-machine testing on p6-b200.48xlarge instances. Key finding:
MC_SLICE_SIZE=262144 nearly doubles EFA throughput from ~70 to ~170 GB/s,
reaching 88% of RoCE RDMA performance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix clang-format violation in transfer_metadata.h

Remove extra space before comment on efa_addr field to satisfy
clang-format-20 style check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [Docs] Add EFA latency benchmark script, rename efa doc to underscore

- Add efa_latency_bench.py: automated benchmark script that measures
  EFA throughput for tuned/default configs via SSH and plots
  Latency vs Cache Size chart
- Add efa_latency_bench.png: benchmark results chart
- Rename efa-transport.md -> efa_transport.md to match naming
  convention of other transport docs (ascend_transport.md, etc.)
- Update toctree reference in index.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Ubuntu <ubuntu@ip-172-31-25-79.us-east-2.compute.internal>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-22-204.us-east-2.compute.internal>
2026-02-08 11:41:17 +08:00
tang c724318217
[Store][Feature] copy and move client support (#1364)
* [Store]: add task executor feature with unit and executor test

Signed-off-by: Vincent Gao <vincentbo@linux.alibaba.com>

* [Store]: add some optimizations to task executor

Refactor the task_executor into the client_service and add a
task structure on the client side. Additionally, remove the
existence check in the execute function;
only retrying should be performed if replica allocation fails.

Signed-off-by: Vincent Gao <vincentbo@linux.alibaba.com>

* [Store]: get source replica from copyStart or moveStart api

* [Store]: call move or copy end if the target replica already exist to complete the replication task

* [Store]: use the max_retry_attempts in master side

* [Store]: add client integration test and set default max_retry_attempts to 10

* [Doc] update task api introduction

Signed-off-by: Vincent Gao <vincentbo@linux.alibaba.com>

* [Store] Set copy and move as private methods

Signed-off-by: Vincent Gao <vincentbo@linux.alibaba.com>

* [Doc]: change the default task max_retry_attempts to 10

* [Doc]: fix some description error

* [Store]: allocate the buffer size to be a multiple of 16MB

* [Store]: validate the replica is in local and directly construct slices from replica buffer address instead of copy the data to local buffer

* [Store]: change the validate logic to directly use transfer engine endpoint or local_hostname_.

* [Store] add e2e ci test for copy and move api

* [Store] refactor the client move and copy function

* [Store] fix the e2e test

* [Store] remove unused code

* [Store] add source field when build replica copy payload in the task_manager_test

* [Store] rename back to snake case for split_into_slices function and also remove hard code for client poll count

* [Store] revert mis deleted field when resolve conflicts

* [Store] change test to validate the real behaviour

* [Store] change the default task fetch size to 16

* [Doc]: change the replica copy/move sequence diagram

* [Store] add new split_into_slice method

* [Store] change the real client to use split_to_slice with buffer handle parameters

---------

Signed-off-by: Vincent Gao <vincentbo@linux.alibaba.com>
Co-authored-by: Vincent Gao <vincentbo@linux.alibaba.com>
2026-02-06 19:02:02 +08:00
ZhangCheng 01d1c6a8b3
[TE] Add auto-connect feature controlled by config and environment variable (#1482)
Co-authored-by: zhangcheng <zhangcheng299@huawei.com>
2026-02-05 14:07:56 +08:00
fatSheep 17b9df8fb8
[Docs]: Add TENT C++ API reference (#1488)
* docs: Add TENT C++ API reference and integrate into documentation navigation

* Update docs/source/design/tent/cpp-api.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Delete trailing asterisks

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-05 13:41:02 +08:00
Feng Ren 5b9243280b
[TENT] Add RDMA-based notification (#1460)
* [TENT] Add RDMA Notification

* Fix notify

* Fix issues

* reformat

* Optimize performance

* Apply suggested changes

* remove duplicated code
2026-02-02 15:13:39 +08:00
fatSheep 9b242111aa
[Doc] improve Transfer Engine C++ API Reference (#1467)
* [Doc] improve Transfer Engine C++ API Reference

* Update docs/source/design/transfer-engine/cpp-api.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update docs/source/design/transfer-engine/cpp-api.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update docs/source/design/transfer-engine/index.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update docs/source/design/transfer-engine/cpp-api.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-02 15:12:05 +08:00
ykwd 5cedb8feb2
[Docs] Update Readme (#1472)
* Fix typos and grammar errors

* fix wrong citation information and increase the formation

---------

Co-authored-by: Ke Yang <yangke@approaching.ai>
2026-02-02 14:18:06 +08:00
ykwd 23181faa51
[Docs] Sync recent news to docs/index.md (#1461)
Co-authored-by: Ke Yang <yangke@approaching.ai>
2026-01-29 15:38:41 +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
Copilot 63778abf88
[Doc] Document all supported communication protocols (#1435)
* Initial plan

* Add comprehensive protocol documentation

Co-authored-by: stmatengss <11641725+stmatengss@users.noreply.github.com>

* Fix table formatting to use markdown instead of RST

Co-authored-by: stmatengss <11641725+stmatengss@users.noreply.github.com>

* Address code review feedback: fix RDMA example and update RDMA test command

Co-authored-by: stmatengss <11641725+stmatengss@users.noreply.github.com>

* Address PR review feedback: update MNNVL terminology and add fallback behavior notes

Co-authored-by: stmatengss <11641725+stmatengss@users.noreply.github.com>

* Update docs/source/getting_started/supported-protocols.md

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stmatengss <11641725+stmatengss@users.noreply.github.com>
Co-authored-by: Teng Ma <teng-ma@linux.alibaba.com>
2026-01-27 01:01:54 +08:00
Lewis 6f6c95e480
Intra-Node NVLink related Docs modification (#1424)
---------

Co-authored-by: 百麒 <yaozhong.lyz@alibaba-inc.com>
Co-authored-by: Teng Ma <teng-ma@linux.alibaba.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-22 22:52:06 +08:00
Biao Sun 1e32df7054
[Store] Support batch query keys api for master service http server (#1417) 2026-01-22 15:54:33 +08:00
herrluk 619b03a954
[TE] Add configurable handshake max length via MC_HANDSHAKE_MAX_LENGTH (#1392)
Add MC_HANDSHAKE_MAX_LENGTH environment variable to configure the maximum
handshake message length in P2P mode.

## Problem

When using P2P handshake mode with a single RDMA instance that registers
many memory buffers (>10,000), the serialized segment metadata JSON can
exceed the hardcoded 1MB limit, causing handshake failures with error:
"readString: too large length from socket: <length>"

Each registered buffer adds ~96 bytes to the JSON payload:
- 1,000 buffers ≈ 94KB
- 5,000 buffers ≈ 469KB
- 10,000 buffers ≈ 938KB (near 1MB limit)
- 15,000 buffers ≈ 1.37MB (exceeds limit)

## Solution

- Add getHandshakeMaxLength() function that reads MC_HANDSHAKE_MAX_LENGTH
- Value is in bytes, valid range: 1MB to 128MB
- Default remains 1MB (1048576 bytes) for backward compatibility
- Logs custom value when set, warns on invalid values

## Usage

```bash
# Set to 4MB to support ~40,000 buffers
export MC_HANDSHAKE_MAX_LENGTH=4194304
```
2026-01-22 14:15:22 +08:00
Lewis c9d64c91c4
[TE] Nvlink intraNode Transport isolation (#1341)
* Add early mem backend detection method in NVLINK_allocator

Add early detection method for sglang NVLINK_allocator to avoid CuMemCreate

Use enumerate type to indicate mem backend type

format check use pre-commit

* Change enumerate type in allocator.py for different mem backend

* Isolate nvlink intraNode transport from nvlink_transport and modify corresponding transfer_engine_bench

* IntraNode transport isolation to be compatible with SGlang

* Modify the code style using pre-commit check

* isolate intraNode nvlink from previous nvlink_transport

* [TE] Revert to previous nvlink_transport

* Delete extra log and refine the code format

* Discard revert due to new related PR has been submitted

* Change the Code format to align with main branch

* Change to clang-format

* Modify transfer_engine_bench to be compatible with protocol --nvlink_intra

* Delete useless function in intranode_nvlink.cpp

* Used for rerun CI

* Modify the intraNode isolation to be compatible with transfer_bench and transfer_engine_impl

* isolate intraNode header file from mnnvl.h

* Delete specific instaince type for intraNode

---------

Co-authored-by: 百麒 <yaozhong.lyz@alibaba-inc.com>
2026-01-22 10:17:12 +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
zhangzuo21 d50eeaca69
[Doc] add troubleshooting of exceeding ulimit (#1405)
* add troubleshooting of exceeding ulimit

* Update docs/source/troubleshooting/troubleshooting.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: Shangming Cai <csmthu@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-20 13:33:21 +08:00
Ruoyu Qin 914ed1d414
[DOC] Add batch API docs and examples for transfer engine (#1395) 2026-01-18 12:49:32 +08:00
ympcMark 971c99ddca
Split Mooncake PG out of Mooncake EP (#1387) 2026-01-16 13:39:37 +08:00
ykwd b98b7e6655
update news (#1383) 2026-01-15 12:42:06 +08:00
siyu e89652985f
[Doc] add docs of Mooncake EPD integration with SGLang (#1262)
* [Doc] add docs of Mooncake EPD integration with SGLang

* fix url

---------

Co-authored-by: Shangming Cai <csmthu@gmail.com>
2026-01-13 14:37:58 +08:00
Stary abb429f935
[TENT] Add Metrics System with HTTP Server and Prometheus Integration (#1355)
* feat(metrics): add TENT metrics system with HTTP server and Prometheus
integration

- Add comprehensive metrics system based on yalantinglibs for monitoring data
transfer performance
- Implement HTTP server with endpoints for Prometheus, JSON, and human-readable
metrics
- Add compile-time and runtime performance optimization with zero-overhead when
disabled
- Integrate metrics into TransferEngine with automatic latency tracking
- Add configuration loader supporting config files and environment variables
- Include example application demonstrating metrics usage
- Add documentation for metrics system configuration and usage

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

* Update docs/source/design/tent/metrics.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* refactor(metrics): simplify config loading with explicit priority

- Replace indirect environment config loading with direct parsing
- Implement clear priority: file config > environment variables > defaults
- Add validation for environment variable values
- Remove redundant default value comparisons

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

* refactor(transfer_engine): extract metrics recording logic into dedicated method

- Add recordTaskCompletionMetrics method to TransferEngineImpl class
- Replace duplicate metrics recording code in getTransferStatus methods with
calls to new method
- Centralize task completion metrics logic for better maintainability

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

* build(metrics): improve yalantinglibs dependency handling

- Change warning to fatal error when TENT_METRICS_ENABLED is ON but
yalantinglibs is missing
- Provide clearer warning message when metrics are disabled

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

* refactor(metrics): replace manual JSON construction with nlohmann/json library

- Use nlohmann/json for cleaner and more maintainable JSON serialization
- Remove manual string stream manipulation and formatting
- Improve code readability and reduce error-prone manual concatenation

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

* style: reformat code with clang-format

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

* refactor(config): centralize parsing utilities in ConfigHelper

- Move parsing functions from MetricsConfigLoader to ConfigHelper
- Add applyEnvironmentOverrides method to reduce code duplication
- Update includes and comments to reflect new structure

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

* test: add unit tests for metrics config loader and reorganize test structure

- Move examples directory to tests directory in CMakeLists.txt
- Add comprehensive unit tests for MetricsConfigLoader functionality
- Include tests for config parsing, environment variable loading, and validation
- Rename and relocate tent_metrics_example.cpp to tests directory

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

* style: reformat code lines for better readability

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

* fix(build): remove redundant Asio dependency from metrics CMakeLists

- Remove Asio dependency search and linking as yalantinglibs bundles it
internally
- Add clarifying comment about bundled Asio in yalantinglibs

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

---------

Signed-off-by: staryxchen <staryxchen@tencent.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-12 16:25:10 +08:00
ykwd 640bb207a6
[Doc] Add goverance doc (#1352) 2026-01-09 18:53:25 -08:00
LiYiMing-lg f98cf979cb
docs: add Docker deployment instructions to Chinese build guide (#1318)
* docs: add Docker deployment instructions to Chinese build guide

* docs: fix Docker path in Chinese build guide
2026-01-04 11:02:07 +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