kvcache-ai / kvcache-ai/Mooncake
[SegmentPool] Remove legacy managers and complete refactor validation
- Dominant language
- C++
- Stars
- 6.6k
- Forks
- 1.2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 312
Description
Parent RFC: #3360
Depends on: #3364
## Goal
Finish the refactor by removing transitional APIs and validating the final ownership model.
## Scope
- Remove legacy `SegmentManager`, `NoFSegmentManager`, and LocalSSD compatibility adapters that no longer own state.
- Remove obsolete scoped accessors, friend declarations, and duplicate indexes.
- Normalize internal naming around `SegmentPool` and `LocalSsdManager`.
- Run focused and broad validation, and document any intentionally preserved quirks in code comments or the parent RFC discussion.
## Out of scope
- New placement or tiering behavior.
- RPC or snapshot format changes.
- NoF snapshot support or generalized promotion.
## Acceptance criteria
- `MasterService` owns `SegmentPool` and `LocalSsdManager` directly.
- No legacy manager contains state or remains as an indefinite forwarding layer.
- No catalog, allocator, segment-name index, or LocalSSD map is duplicated.
- RPC, snapshot, placement, metrics, and lifecycle behavior remain compatible.
- Relevant Mooncake Store tests, formatting, and pre-commit checks pass.
## Contribution notes
Please comment before starting. This issue should begin only after the NoF integration is merged or stable enough to rebase onto; keep cleanup separate from feature additions.
Contributor guide
Research direction
Start with parent RFC #3360 and dependency #3364, then trace MasterService ownership of SegmentPool and LocalSsdManager. Inspect the legacy managers, scoped accessors, friend declarations, and duplicate indexes named in the scope. Done means the transitional state holders are removed, compatibility behavior remains intact, and relevant Mooncake Store tests, formatting, and pre-commit checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100