Expand description
Checkpoint serialization and restoration for [SpatialIndexManager].
Persists the full in-memory spatial state to Namespace::Spatial so that a
cold open can load the index without rebuilding from CRDT documents.
§Key layout under Namespace::Spatial
| Key | Value |
|---|---|
spatial:_collections | MessagePack Vec<(String, String)> — (collection, field) pairs |
spatial:{collection}:{field}:docmap | MessagePack Vec<(String, u64)> — doc_id → entry_id |
spatial:_next_id | MessagePack u64 — next entry ID |
The R-tree blob (spatial:{collection}:{field}:rtree) is stored in a pagedb
segment when as_spatial_segment_ext() is available, or falls back to the
Namespace::Spatial KV path (e.g. WASM). In both cases the
bytes stored are the CRC32C-wrapped R-tree checkpoint produced by
crate::storage::checksum::wrap.