Expand description
SpatialSegmentExt — pagedb segment operations for R-tree checkpoint data.
The StorageEngine trait handles sparse, sorted, key-value state. For R-tree
checkpoint blobs (one per (collection, field) pair, potentially large,
sequentially read on cold-open restore) pagedb segments are the appropriate
backing. A single segment per (collection, field) reduces B+ tree pressure from
O(rtree_node_count) entries to O(1) per index.
The following keys remain on the B+ tree (Namespace::Spatial):
spatial:_collections—Vec<(String, String)>catalog (collection, field)spatial:_next_id—u64next entry IDspatial:{collection}:{field}:docmap— doc_id → entry_id mapping
Only the spatial:{collection}:{field}:rtree blob (CRC32C-wrapped R-tree
checkpoint bytes) moves to pagedb segments.
Only compiled on non-WASM targets. WASM stays on the KV blob path.
Traits§
- Spatial
Segment Ext - Extension trait: write, open, and delete R-tree checkpoint segments backed by pagedb encrypted segment files.