- Remove gitlinks (160000 mode) for chainfire, flaredb, iam - Add workspace contents as regular tracked files - Update flake.nix to use simple paths instead of builtins.fetchGit This resolves the nix build failure where submodule directories appeared empty in the nix store. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
Data Model: Multi-Raft (Static → Split → Move)
Entities
-
Store
id: u64addr: String- Holds multiple
Peerinstances (one perRegionreplica) and reports status to PD.
-
Region
id: u64start_key: bytesend_key: bytes(empty = infinity)voters: Vec<u64>(store IDs)leader_id: u64approx_size_bytes: u64
-
Peer
store_id: u64region_id: u64raft_state: HardState, ConfStatepending_eventual: VecDeque<(ns_id, key, value, ts)>
-
Placement Metadata (PD)
stores: [Store]regions: [Region]move_directives: [(region_id, from_store, to_store)]
Relationships
- Store 1..* Peer (per Region replica)
- Region 1..* Peer (across Stores)
- PD owns canonical Region→Store mapping and Move directives.
Lifecycle
- Bootstrap: PD returns initial
regions→ Store creates Peers and persists meta. - Split: Region exceeds threshold → Split command commits → two Region metas persisted → new Peer created.
- Move: PD issues
MoveRegion→ leader adds replica on target store (ConfChange Add) → replica catches up → old replica can be removed via ConfChange Remove.
Constraints
- Region key ranges must be non-overlapping and sorted.
- Raft storage/logs are prefixed by
region_idto avoid cross-region collisions. - Quorum required for writes; ConfChange operations must preserve quorum at each step.