[PR #1364] [MERGED] [Store][Feature] copy and move client support #2196

Closed
opened 2026-10-29 21:33:31 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/1364
Author: @zhongzhouTan-coder
Created: 1/13/2026
Status: ✅ Merged
Merged: 2/6/2026
Merged by: @stmatengss

Base: main ← Head: feature/copy-move-client-support


📝 Commits (10+)

  • da222fb [Store]: add task executor feature with unit and executor test
  • c4ed218 [Store]: add some optimizations to task executor
  • 99b73e1 [Store]: get source replica from copyStart or moveStart api
  • c543bae [Store]: call move or copy end if the target replica already exist to complete the replication task
  • d9c16e9 [Store]: use the max_retry_attempts in master side
  • 8272e38 [Store]: add client integration test and set default max_retry_attempts to 10
  • 081dcd8 [Doc] update task api introduction
  • d23dbc7 [Store] Set copy and move as private methods
  • 5c6fc9a [Doc]: change the default task max_retry_attempts to 10
  • e1eebcc [Doc]: fix some description error

📊 Changes

27 files changed (+3239 additions, -60 deletions)

View changed files

📝 .github/workflows/ci.yml (+11 -0)
📝 docs/source/deployment/mooncake-store-deployment-guide.md (+7 -1)
📝 docs/source/design/mooncake-store.md (+71 -8)
➕ docs/source/image/mooncake-store-client-create-copy-task.png (+0 -0)
➕ docs/source/image/mooncake-store-client-create-move-task.png (+0 -0)
📝 docs/source/python-api-reference/mooncake-store.md (+126 -0)
📝 docs/source/zh_archive/mooncake-store.md (+66 -7)
📝 mooncake-integration/store/store_py.cpp (+4 -1)
📝 mooncake-store/include/client_buffer.hpp (+10 -3)
📝 mooncake-store/include/client_service.h (+53 -0)
📝 mooncake-store/include/master_config.h (+17 -0)
📝 mooncake-store/include/rpc_types.h (+5 -2)
📝 mooncake-store/include/task_manager.h (+6 -2)
📝 mooncake-store/include/thread_pool.h (+1 -0)
📝 mooncake-store/include/types.h (+3 -0)
📝 mooncake-store/src/client_buffer.cpp (+10 -4)
📝 mooncake-store/src/client_service.cpp (+328 -4)
📝 mooncake-store/src/master.cpp (+11 -0)
📝 mooncake-store/src/master_service.cpp (+6 -6)
📝 mooncake-store/src/task_manager.cpp (+2 -1)

...and 7 more files

📄 Description

Description

For the review purpose, we just split the large pr to three small pr.
refer to the origin pr: https://github.com/kvcache-ai/Mooncake/pull/1278

In order to support the dynamic replica adjustment, we need to support replica move and copy first, so we implement the basic replica copy and move features.

The detailed architecture design in the RFC: https://github.com/kvcache-ai/Mooncake/issues/1159

Features in this pr:

  1. Document New Asynchronous Task APIs
    • Added documentation for the new task APIs: create_copy_task, create_move_task, and query_task, with usage examples and monitoring patterns.
    • Improved Python binding output for QueryTaskResponse to include additional fields like creation time, last update time, and status message.
  2. Task Management and Configuration Enhancements
    • Introduced new task management configuration options to control retry behavior for asynchronous tasks (max_retry_attempts).
  3. Client-Side Task Execution Support
    • Added new methods and data structures to the Client class for polling, dispatching, submitting, and executing asynchronous tasks, including a thread pool for background task execution.
  4. Testing and CI Improvements
    • Added a new CI step to run tests for the Mooncake copy/move API, ensuring automated validation of the new features.

Type of Change

  • Types
    • Bug fix
    • New feature
      • Transfer Engine
      • Mooncake Store
      • Mooncake EP
      • Integration
      • P2P Store
      • Python Wheel
    • Breaking change
    • CI/CD
    • Documentation update
    • Other

How Has This Been Tested?

  • unit test
  • integration
  • e2e test

Checklist

  • I have performed a self-review of my own code.
  • I have updated the documentation.
  • I have added tests to prove my changes are effective.

Main Contributor

Vincent Gao vincentbo@linux.alibaba.com

Co-authors

Chen Jinlong chenjinlong.cjl@alibaba-inc.com
Tan Zhongzhou 1710115119@bjmu.edu.cn


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/Mooncake/pull/1364 **Author:** [@zhongzhouTan-coder](https://github.com/zhongzhouTan-coder) **Created:** 1/13/2026 **Status:** ✅ Merged **Merged:** 2/6/2026 **Merged by:** [@stmatengss](https://github.com/stmatengss) **Base:** `main` ← **Head:** `feature/copy-move-client-support` --- ### 📝 Commits (10+) - [`da222fb`](https://github.com/kvcache-ai/Mooncake/commit/da222fb670b21bd16495dce62ccb0c3d53d371d7) [Store]: add task executor feature with unit and executor test - [`c4ed218`](https://github.com/kvcache-ai/Mooncake/commit/c4ed21844b3eb8ef343f663b694394d717316d86) [Store]: add some optimizations to task executor - [`99b73e1`](https://github.com/kvcache-ai/Mooncake/commit/99b73e19fd9e0987fb6570925bfba71183d8b550) [Store]: get source replica from copyStart or moveStart api - [`c543bae`](https://github.com/kvcache-ai/Mooncake/commit/c543baef2152efa5920c154b9018ed480b2d173b) [Store]: call move or copy end if the target replica already exist to complete the replication task - [`d9c16e9`](https://github.com/kvcache-ai/Mooncake/commit/d9c16e9bea783c4530581f8efb52f5d59a2906d2) [Store]: use the max_retry_attempts in master side - [`8272e38`](https://github.com/kvcache-ai/Mooncake/commit/8272e386757544e3c29e8126689783ecfb4eb092) [Store]: add client integration test and set default max_retry_attempts to 10 - [`081dcd8`](https://github.com/kvcache-ai/Mooncake/commit/081dcd88d0d1dde0094223a51689963e2f2e0e69) [Doc] update task api introduction - [`d23dbc7`](https://github.com/kvcache-ai/Mooncake/commit/d23dbc758019b2ba44b94641001cc08c9d2c886a) [Store] Set copy and move as private methods - [`5c6fc9a`](https://github.com/kvcache-ai/Mooncake/commit/5c6fc9ae66a271607fb10a9bec8dda6250c32769) [Doc]: change the default task max_retry_attempts to 10 - [`e1eebcc`](https://github.com/kvcache-ai/Mooncake/commit/e1eebcc31ff9036d66906b8bcfdea9db5783b953) [Doc]: fix some description error ### 📊 Changes **27 files changed** (+3239 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+11 -0) 📝 `docs/source/deployment/mooncake-store-deployment-guide.md` (+7 -1) 📝 `docs/source/design/mooncake-store.md` (+71 -8) ➕ `docs/source/image/mooncake-store-client-create-copy-task.png` (+0 -0) ➕ `docs/source/image/mooncake-store-client-create-move-task.png` (+0 -0) 📝 `docs/source/python-api-reference/mooncake-store.md` (+126 -0) 📝 `docs/source/zh_archive/mooncake-store.md` (+66 -7) 📝 `mooncake-integration/store/store_py.cpp` (+4 -1) 📝 `mooncake-store/include/client_buffer.hpp` (+10 -3) 📝 `mooncake-store/include/client_service.h` (+53 -0) 📝 `mooncake-store/include/master_config.h` (+17 -0) 📝 `mooncake-store/include/rpc_types.h` (+5 -2) 📝 `mooncake-store/include/task_manager.h` (+6 -2) 📝 `mooncake-store/include/thread_pool.h` (+1 -0) 📝 `mooncake-store/include/types.h` (+3 -0) 📝 `mooncake-store/src/client_buffer.cpp` (+10 -4) 📝 `mooncake-store/src/client_service.cpp` (+328 -4) 📝 `mooncake-store/src/master.cpp` (+11 -0) 📝 `mooncake-store/src/master_service.cpp` (+6 -6) 📝 `mooncake-store/src/task_manager.cpp` (+2 -1) _...and 7 more files_ </details> ### 📄 Description ## Description For the review purpose, we just split the large pr to three small pr. refer to the origin pr: https://github.com/kvcache-ai/Mooncake/pull/1278 In order to support the dynamic replica adjustment, we need to support replica move and copy first, so we implement the basic replica copy and move features. The detailed architecture design in the RFC: https://github.com/kvcache-ai/Mooncake/issues/1159 Features in this pr: 1. **Document New Asynchronous Task APIs** - Added documentation for the new task APIs: `create_copy_task`, `create_move_task`, and `query_task`, with usage examples and monitoring patterns. - Improved Python binding output for `QueryTaskResponse` to include additional fields like creation time, last update time, and status message. 2. **Task Management and Configuration Enhancements** - Introduced new task management configuration options to control retry behavior for asynchronous tasks (`max_retry_attempts`). 3. **Client-Side Task Execution Support** - Added new methods and data structures to the `Client` class for polling, dispatching, submitting, and executing asynchronous tasks, including a thread pool for background task execution. 4. **Testing and CI Improvements** - Added a new CI step to run tests for the Mooncake copy/move API, ensuring automated validation of the new features. ## Type of Change * Types - [ ] Bug fix - [x] New feature - [ ] Transfer Engine - [x] Mooncake Store - [ ] Mooncake EP - [ ] Integration - [ ] P2P Store - [ ] Python Wheel - [ ] Breaking change - [x] CI/CD - [x] Documentation update - [ ] Other ## How Has This Been Tested? - unit test - integration - e2e test ## Checklist - [x] I have performed a self-review of my own code. - [x] I have updated the documentation. - [x] I have added tests to prove my changes are effective. ## Main Contributor Vincent Gao vincentbo@linux.alibaba.com ## Co-authors Chen Jinlong chenjinlong.cjl@alibaba-inc.com Tan Zhongzhou 1710115119@bjmu.edu.cn --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:33:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/Mooncake#2196
No description provided.