mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[PR #1268] [MERGED] [Store] feat Uncouple client segment meta from allocator #2119
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#2119
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/1268
Author: @wanyue-wy
Created: 12/23/2025
Status: ✅ Merged
Merged: 12/31/2025
Merged by: @wanyue-wy
Base:
P2P-Mooncake-Store← Head:uncoupled_client_segment_meta📝 Commits (5)
4632f72rename segment manager880c5ef1. implement segment managerb4977b9fix pure virtual function call in construct function2c8ffdcclang format58110cffix some details📊 Changes
19 files changed (+1416 additions, -909 deletions)
View changed files
➕
mooncake-store/include/centralized_client_manager.h(+41 -0)➕
mooncake-store/include/centralized_segment_manager.h(+123 -0)➕
mooncake-store/include/client_manager.h(+62 -0)📝
mooncake-store/include/master_metric_manager.h(+0 -2)📝
mooncake-store/include/master_service.h(+2 -23)➕
mooncake-store/include/p2p_client_manager.h(+24 -0)➕
mooncake-store/include/p2p_segment_manager.h(+23 -0)➖
mooncake-store/include/segment.h(+0 -232)➕
mooncake-store/include/segment_manager.h(+78 -0)📝
mooncake-store/src/CMakeLists.txt(+6 -1)➕
mooncake-store/src/centralized_client_manager.cpp(+179 -0)➕
mooncake-store/src/centralized_segment_manager.cpp(+313 -0)➕
mooncake-store/src/client_manager.cpp(+145 -0)📝
mooncake-store/src/master_service.cpp(+59 -306)➕
mooncake-store/src/p2p_client_manager.cpp(+22 -0)➕
mooncake-store/src/p2p_segment_manager.cpp(+35 -0)➖
mooncake-store/src/segment.cpp(+0 -260)➕
mooncake-store/src/segment_manager.cpp(+222 -0)📝
mooncake-store/tests/segment_test.cpp(+82 -85)📄 Description
Description
This is the first PR for Mooncake Store P2P architecture (#1209 ). As described in the RFC, during the first implementing phase of the new architecture, we will focus on extracting the common execution paths shared by both architectures to base class and specialize architecture-specific logic in subclasses. In this PR, we reorganized the structure of segment-related code without changing its underlying processing logic. Specifically, we made the following changes:
SegmentAccesswithSegmentManager.SegmentManagerencapsulates all segment locks within its methods and no longer exposes them externally via RAII. We can then specialize the segment management logic for each architecture separately based onSegmentManager. For example,CentralizedSegmentManagerassociates segments with the allocator to support the data allocation logic of the master-based centralized architecture.ClientManagerto manage client states and their associated resources. It not only proxies the original segment management interface but also monitor client states by handling periodic heartbeat requests from clients. Similarly, due to the status machine of client is different from the two architectures, we also specialize the subclasses to handle with their own logic.Additionally, in the current PR,
MasterServiceis defaulted to the centralized architecture. In the next PR, we will apply a similar generalization toMasterService.Type of Change
How Has This Been Tested?
Since the changes in this PR do not involve any modifications to underlying mechanisms, the code is verified only by the existing test suite.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.