Expand description
Prefix-aware lookup index used by the router.
Each chunk hash (32 bytes, BLAKE3 over TOKENS_PER_CHUNK token ids — see
crate::hash) is mapped to the set of nodes that currently hold that
chunk, with TTL and last-seen timestamps for staleness control.
The index is concurrent-safe and read-mostly. It is rebuilt incrementally from etcd / gossip events; the router queries it on every request to compute KV-overlap scores.
Structs§
- Node
Entry - Per-node entry stored under each prefix.
- Prefix
Index - Concurrent prefix → nodes index. The internal map is
DashMapkeyed by the 32-byte digest. Per-prefix node lists are guarded by aRwLockto avoid lock contention on hot keys.