kvcache-ai / kvcache-ai/Mooncake
[Feature Request]: Persist NoF storage pool registrations across master restarts
- Dominant language
- C++
- Stars
- 6.6k
- Forks
- 1.2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 312
Description
## Problem
NoF storage pool registrations are not persisted in master snapshots. After a master restart or recovery from a snapshot, previously registered namespaces must be registered again by an external tool before the master can use them as allocatable storage pools.
This is a must-have for our production use: master startup and failure recovery should not depend on an additional registration workflow when the backend namespaces still exist and remain reachable.
## Current behavior
NoF namespaces are registered through `MountNoFSegment`, which supplies the namespace connection information, base offset, and capacity. The master then creates the corresponding space allocator.
On main at `6a55edc668c1320ee7c3ad8da18297ebb0576b4a`:
- [`ScopedNoFSegmentAccess::MountSegment`](https://github.com/kvcache-ai/Mooncake/blob/6a55edc668c1320ee7c3ad8da18297ebb0576b4a/mooncake-store/src/segment.cpp#L1269-L1333) creates an allocator from the registered endpoint, base offset, and size.
- [`MasterSnapshotCodec::EncodeSegments` / `DecodeSegments`](https://github.com/kvcache-ai/Mooncake/blob/6a55edc668c1320ee7c3ad8da18297ebb0576b4a/mooncake-store/src/ha/snapshot/master_snapshot_codec.cpp#L121-L139) do not persist or restore `NoFSegmentManager`. The encoder explicitly documents this omission.
## Requested behavior
- Persist the registered NoF pool metadata needed for recovery, including namespace identity/connection information, base offset, and capacity.
- [x] Make sure you already searched for relevant issues and read the [documentation](https://kvcache-ai.github.io/Mooncake/)
Contributor guide
Research direction
Start in mooncake-store/src/segment.cpp at ScopedNoFSegmentAccess::MountSegment, then read mooncake-store/src/ha/snapshot/master_snapshot_codec.cpp around MasterSnapshotCodec::EncodeSegments and DecodeSegments. Trace the NoFSegmentManager metadata used by the allocator and determine the existing snapshot recovery flow. Done means registered NoF pool identity, connection information, base offset, and capacity survive master snapshots and restore usable allocators after restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100