Commit Graph

1046 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] 53e6a0e1e9 Fix P2PClientService::Put to return error code on failure
Co-authored-by: stmatengss <11641725+stmatengss@users.noreply.github.com>
2026-04-05 06:10:17 +00:00
copilot-swe-agent[bot] 5f4fe07c32
Initial plan 2026-04-05 06:03:33 +00:00
Ken J da67fad95f
[Store] Add Go language bindings for Mooncake Store (#1764) 2026-04-04 00:25:40 +08:00
ykwd 483c9970f7
[Chore] Update codeowners (#1819)
* Update codeowners

* Update codeowners

---------

Co-authored-by: Ke Yang <yangke@approaching.ai>
2026-04-03 19:03:17 +08:00
ZhangCheng 18c59612f7
[TENT] Disconnect before registering memory (#1807)
Co-authored-by: zhangcheng <zhangcheng299@huawei.com>
2026-04-03 14:25:22 +08:00
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
lujh 5ff565dcab
[CI] fix bugs with CI pr1782: fail-fast on format check and restore Ascend/Integration as PR gates (#1806) 2026-04-02 22:07:38 +08:00
dtc a85800b83f
[TENT] Fix duplicate notify recv WR posting and PLOG misuse in RDMA endpoint (#1803)
---------

Signed-off-by: Tianchen Ding <dtcccc@linux.alibaba.com>
2026-04-02 19:51:18 +08:00
fatSheep 2e3b3c5769
fix: serialize eviction test Puts to ensure deterministic FIFO order (#1800)
The write_thread_pool_ has 2 threads, so concurrent PutToLocalFile calls
can complete in arbitrary order, causing the FIFO eviction queue to not
match the logical Put order. Wait for each key's DISK replica before
putting the next to guarantee key_0 is always the oldest entry.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 18:09:08 +08:00
timzhang0727 e426e350e4
[Bugfix][Build] Fix S3SnapshotObjectStore Pimpl error & improve build reliability (#1796)
* [Bugfix] Fix Pimpl pattern compilation error in S3SnapshotObjectStore

Move destructor definition from header (= default) to source file,
where the Impl class is fully defined. This fixes the incomplete type
error when std::unique_ptr<Impl> tries to instantiate its destructor.

Signed-off-by: timzhang0727

* [Build] Improve Go download reliability and smart GOPROXY configuration

1. Go download: Add mirror fallback for restricted network environments.
   Try go.dev first, then golang.google.cn, then mirrors.aliyun.com.
   Each mirror has a 30s timeout and 2 retries before falling back.

2. GOPROXY: Automatically detect restricted network environments based
   on whether the Go download fell back to a CN mirror. Only set
   GOPROXY (goproxy.cn, goproxy.io, direct) when CN mirror was used
   and GOPROXY is not already configured by the user. This avoids
   unnecessarily routing traffic through CN proxies in environments
   with normal international network access (e.g. GitHub CI).

Signed-off-by: timzhang0727

---------

Signed-off-by: timzhang0727
Co-authored-by: Tianxiang Zhang <timskyzhang@tencent.com>
2026-04-02 17:13:37 +08:00
Teng Ma fdee379b21
[P2P] fix: cannot disable NV_PEERMEM and enable CUDA at the same time (#1797)
fix:  cannot disable NV_PEERMEM and enable CUDA at the same time
2026-04-02 14:06:33 +08:00
Ken J cd1ef9b536
[Store] Add C API for Mooncake Store (#1763)
* [Store] Add C API for Mooncake Store

Introduce an extern "C" API layer (store_c.h / store_c.cpp) over the
existing C++ RealClient, enabling any FFI-capable language to consume
Mooncake Store without linking against C++ symbols.

Covers: lifecycle (create/destroy/setup), put/get (including zero-copy
and batch variants), existence/size checks, remove operations, buffer
registration, and health checks.

* Address review: add try-catch guards, c_str_or helper, idiomatic vectors

- Wrap all extern "C" functions in try-catch to prevent C++ exceptions
  from crossing the FFI boundary (undefined behavior)
- Add c_str_or() helper to deduplicate null-check fallback pattern
- Use reserve/emplace_back and range constructors for batch vectors

* fix C API code formatting

* Address Copilot review: fix destroy leak, input validation, null key rejection

- destroy(): move delete handle outside try-catch to prevent leak if
  tearDownAll() throws
- init_all(): default protocol to "tcp" instead of empty string
- put_from(), get_into(): reject NULL buffer when size > 0
- batch_put_from(), batch_get_into(): validate per-element keys (non-null)
  and buffers (non-null when size > 0) before calling into RealClient
- batch_is_exist(): reject null keys instead of silently converting to ""
2026-04-02 13:43:20 +08:00
Teng Ma ba5f3ac2db
[Build] add yalantinglibs submodule (#1781)
* [Build] Manage yalantinglibs as extern submodule

Move yalantinglibs under extern as a git submodule so dependency setup uses the repo-managed source instead of downloading an archive into thirdparties.

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.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-04-02 13:39:23 +08:00
EkiRui f6a7c6b798
[STORE] split HA runtime and unify standby lifecycle (#1777)
* [STORE] split master admin and service runtime

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] wire standby replication into runtime states

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] drive standby runtime with replication callbacks

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] compose standby replication from snapshot and oplog capabilities

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] unify standby lifecycle entry points

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] add snapshot provider backend integration tests

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] reorganize HA tests and add bootstrap coverage

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] tighten serve lifecycle transitions

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] persist snapshot watermark and gate standby promotion

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] rename standby controller and extract supervisor loop

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* rename standby_controller.cpp file

* Replace replication_controller with standby_controller

* Add standby_controller.h header file

* Update include directive for standby_controller

* Replace replication_controller with standby_controller include

* Replace replication_controller with standby_controller

---------

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Co-authored-by: Xuchun Shang <xuchun.shang@gmail.com>
2026-04-02 13:28:23 +08:00
lujh f0a1dc8717
[CI] Add fail-fast mechanism and stage-based execution (#1782)
Changes:
- Add job dependencies in ci.yml (build jobs depend on spell-check/clang-format)
- Convert ci_ascend.yml and integration-test.yml to workflow_run trigger
- Add paths-filter to avoid running on docs-only PRs
- Fix context variables in integration-test.yml for workflow_run
- Add paths filtering to ci_cu13.yml
2026-04-02 10:23:02 +08:00
usernamehaha2022 81100d93c9
[Transfer Engine] Round-robin slice batch across QPs in RdmaEndPoint::submitPostSend (#1721)
* add multi-qp spraying in RDMA transfer path

* fix bug

---------

Co-authored-by: 玄武 <wangmingyao@xiaohongshu.com>
2026-04-02 09:41:58 +08:00
dependabot[bot] ccf68da040
Bump google.golang.org/grpc in /mooncake-common/etcd (#1785)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.59.0 to 1.79.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.59.0...v1.79.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.79.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 19:42:56 +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
Shangming Cai ba862909f5
Bump version to 0.3.10.post1 in pyproject.toml (#1788) 2026-04-01 11:49:13 +08:00
Xuchun Shang a56eb6a119
Fix TENT Python binding initialization and build output (#1778)
This PR fixes three issues in the local TENT Python path
that block stable integration:

  - make the built Python module importable as tent
  - load TransferEngine(<config_path>) as a config file via loadFile(...)
  - fix RDMA status string construction in rdma_transport.cpp

Signed-off-by: Xuchun Shang <xuchun.shang@linux.alibaba.com>
2026-04-01 10:09:23 +08:00
zhangzuo21 c78d4e9512
[Store] Fix SSD offload failure in Metadata Server mode (#1729) (#1771)
* [Store] Fix SSD offload failure in Metadata Server mode (#1729)

Use Client::IsReplicaOnLocalMemory() in FileStorage::BatchQuerySegmentSlices
instead of directly comparing transport_endpoint_ with GetTransportEndpoint().
The direct comparison only works in P2P_HANDSHAKE mode where both sides use
the RDMA NIC IP. In Metadata Server mode, transport_endpoint_ is set to
local_hostname_ while GetTransportEndpoint() returns the RDMA IP, causing
a mismatch in multi-NIC environments and INVALID_KEY errors.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 10:05:42 +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
Teng Ma d32bbc4048
[Skill] run mooncake unit tests locally (#1774) 2026-03-31 15:21:03 +08:00
Xuanlin_Mi aebd5eff4a
fix(tent): address build issues and enable CI coverage (#1768)
* fix(tent): address build issues and enable CI coverage

* fix(ci): disable tent in standalone te build

* fix(tent): honor use_cuda in cmake

* fix(tent): decode http metadata test query keys

* revert(ci): restore workflow to main
2026-03-31 13:44:05 +08:00
ZiWei Yuan b9a593c5e8
[PG][TENT] Fix first-collective hangs on NVLink/MNNVL bootstrap (#1755)
* [PG]: integrate with tent's nvlink problem

* [PG]: code format

* [tent] code format
2026-03-31 12:44:17 +08:00
ZhangCheng cf835bed51
[tent] Remove sync parameter and buffer pool config, unify into TransferAsync in AscendDirectTransport (#1758)
Co-authored-by: zhangcheng <zhangcheng299@huawei.com>
2026-03-30 20:03:57 +08:00
Zhanhao Cao 4b3d44f39f
[TE] Fix simultaneous open handshake in RdmaEndpoint (#1733)
* [TE] Fix simultaneous open handshake in RdmaEndpoint

* Keep the same logic for ERDMA.

* apply gemini-code-assist's suggestion.

* Fix endpoint reinitialization.

* Add disconnect and waiting with back-off.

* Add eRDMA Endpoint Re-establishment Test

* Include the test in cmake

* Address reviewer comments

* Better log message.
2026-03-30 10:03:12 +08:00
Houjiang Chen 41d40dabd7
fix get start_timestamp but batch_desc has already freed (#1760) 2026-03-30 09:52:10 +08:00
fatSheep 7113245ee4
[DOC] Add troubleshooting for RDMA MKEY resource exhaustion (#1765) 2026-03-29 16:14:38 +08:00
Xun Sun 77ae1034a6
[PG] Enable asynchronous recovered-rank initialization with deferred join (#1744)
During Elastic EP rank recovery, the recovered rank must re-run expensive initialization (especially CUDA graph capture).
  Previously, this required the recovered and healthy ranks to enter the same communication phase, which paused healthy-rank inference and increased recovery disruption.

  This change enables **asynchronous recovered-rank initialization** in Mooncake PG: recovered ranks can initialize in isolation first, then join the live process group after local recovery work is finished.
2026-03-29 13:26:21 +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
Feng Ren 4d163b026d
[TE] fix tebench RPATH to find libasio.so at runtime (#1750)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 00:56:07 +08:00
EkiRui e1220bb309
[STORE] support Redis ACL username authentication and reorganize HA (#1757) 2026-03-27 15:22:09 +08:00
Liu Yuji af733e1209
[PG] Add GPU barrier support for mooncake-pg (#1751)
Co-authored-by: liam <yzwliam@126.com>
2026-03-27 12:51:01 +08:00
Xuanlin_Mi 418bb774ad
Fix/tent slice queue race (#1737)
* fix: serialize TENT slice queue access

* fix(tent): guard endpoint teardown with lifecycle lock

* refactor(tent): unify rdma lanes and remove per-qp lock

* style(tent): format rdma sources
2026-03-27 10:17:12 +08:00
EkiRui 50bc7cf976
[STORE] abstract snapshot catalog and add Redis snapshot backend (#1739)
* [STORE] abstract snapshot catalog in master service

Introduce SerializerSnapshotStore as the snapshot catalog adapter for the existing serializer backend and route MasterService persist, restore, and cleanup flows through it instead of open-coding latest marker updates and snapshot directory scans.

Also add focused unit coverage for publish/get/list/delete behavior so the snapshot catalog path can evolve independently from the payload storage path.

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] distinguish missing snapshots from backend read errors

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] add Redis snapshot catalog backend

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] share Redis connection helpers across HA backends

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Co-authored-by: Xuchun Shang <xuchun.shang@linux.alibaba.com>

* [STORE] unify Redis test helpers

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

* [STORE] tighten snapshot catalog state handling

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>

---------

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
2026-03-27 09:52:55 +08:00
ascend-direct-dev 5821a19547
ascend adapt to dummy real (#1723)
Co-authored-by: youxiao <youxiao@huawei.com>
2026-03-26 14:34:08 +08:00
ybyang fad70b90d9
[CLI] add script for metadata management (#1746)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-26 13:18:19 +08:00
QiuRuiqi 5002ae6ac1
[TE] fix: update submitTransferTask parameter type (#1748) 2026-03-26 13:15:28 +08:00
Xuanlin_Mi 49ec245620
Fix/tent store metadata override (#1743)
* fix: preserve explicit tent metadata config

* Fix tent config override for string rpc port

* Validate tent rpc port overrides and test startup path

* Format tent config override test
2026-03-26 10:02:19 +08:00
Xun Sun 1818be8594
[PG] Increase kP2PBufferSize to unlock full performance potential (#1740) 2026-03-25 18:48:06 +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
JunlinW ece427ed2a
[PG] optimize p2p-proxy buffer size (#1735) 2026-03-25 10:53:27 +08:00
xleoken 86fef8cbeb
add required library when build (#1674)
Signed-off-by: xleoken <xleoken@163.com>
2026-03-25 10:43:46 +08:00
Dayuxiaoshui 6f0fbbfd1f
[TRANSFER_ENGINE] add initial MACA build path and CUDA-like adapter (#1731)
Introduce a first-pass MACA integration with a dedicated USE_MACA switch, transfer-engine linkage, and a MACA vendor compatibility header so Mooncake can build and run basic store setup/put/get on MACA environments.
2026-03-25 10:13:49 +08:00
Xuchun Shang ef34131c7d
store: split client HA/control-plane threads and suppress zero-seg he… (#1736)
* store: split client HA/control-plane threads and suppress zero-seg heartbeats

Refactor the store client control plane so leader monitoring, storage
heartbeat, and task polling are managed separately, and route leader
switching through a single serialized SwitchLeader() path.

This changes zero-global-segment behavior so setup no longer starts the
storage heartbeat/task polling control plane when no segment is mounted,
which avoids flooding master with useless ping traffic from zero-seg
clients. The storage control plane now starts lazily from actual mount
paths.

Also add regression and smoke coverage for:
- zero-seg clients not pinging before mount
- heartbeat starting after mount
- non-HA reconnect/remount behavior
- zero-seg HA smoke and non-zero ping/fetch-task smoke

Signed-off-by: Xuchun Shang <xuchun.shang@linux.alibaba.com>

* format

Signed-off-by: Xuchun Shang <xuchun.shang@linux.alibaba.com>

* fix

Signed-off-by: Xuchun Shang <xuchun.shang@linux.alibaba.com>

---------

Signed-off-by: Xuchun Shang <xuchun.shang@linux.alibaba.com>
2026-03-25 10:09:12 +08:00
EkiRui 11fd29abd2
[STORE] add Redis leadership backend and HA regression coverage (#1722)
Add the Redis leader coordinator behind the HA backend abstraction and wire it into the store and test builds so Redis can participate as a first-class leadership backend alongside etcd.

Also make the HA/e2e test harness backend-agnostic, add Redis leadership regression tests, and fix the client test wrapper to pass HA master entries correctly so the chaos suite exercises the real HA path.

---------

Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
2026-03-25 01:03:56 +08:00
ascend-direct-dev 688849bedb
refactor ascend direct transport (#1720)
Co-authored-by: youxiao <youxiao@huawei.com>
2026-03-24 21:51:58 +08:00
Xun Sun bc9947873e
[Misc] Improve developers' experience for EP & PG (#1708)
Some IDEs (like CLion) uses CMakeLists.txt for smart context. This PR adds an optional flag `EP_USE_IDE` that IDE users can enable. It is switched off by default, so that it will not affect production systems.
2026-03-24 10:45:22 +08:00