kvcache-ai / kvcache-ai/Mooncake
[SegmentPool] Integrate NoF mounted regions into SegmentPool
- Dominant language
- C++
- Stars
- 6.6k
- Forks
- 1.2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 312
Description
Parent RFC: #3360
Depends on: #3363
## Goal
Make `SegmentPool` the single owner of mounted Memory, CXL, and NoF allocation regions.
## Scope
- Move NoF mounted-region records, client/name indexes, allocator state, status, remount, and unmount lifecycle into `SegmentPool`.
- Move the NoF catalog and allocator ownership together so no merged revision coordinates two authoritative managers.
- Keep separate internal allocator lanes where Memory/CXL and NoF descriptor semantics require them.
- Preserve `MountNoFSegment`, `ReMountNoFSegment`, query, heartbeat-driven unmount, and other external RPC behavior through boundary conversion.
## Out of scope
- Adding NoF snapshot persistence.
- Supporting LocalSSD promotion to NoF.
- Changing NoF placement, eviction, heartbeat, descriptor, or transfer behavior.
## Acceptance criteria
- NoF mounted-region and allocator state have one authoritative owner in `SegmentPool`.
- Mount failure and rollback cannot leave catalog and allocator state inconsistent.
- Existing Memory/CXL behavior is unaffected.
- `segment_test`, `nof_heartbeat_test`, relevant MasterService tests, and USE_NOF builds pass.
## Contribution notes
This is the largest and most concurrency-sensitive part of the RFC. Please comment before starting with the proposed state move, lock ordering, rollback behavior, and test plan.
Contributor guide
Research direction
Read parent RFC #3360 and dependency #3363 first, then inspect SegmentPool and the existing NoF mounted-region and allocator lifecycle. Agree on state movement, lock ordering, rollback behavior, and a test plan before starting. Run segment_test, nof_heartbeat_test, relevant MasterService tests, and USE_NOF builds; done means unified ownership with preserved RPC behavior and consistent failure rollback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100