Skip to main content

Module persist

Module persist 

Source
Expand description

R-tree checkpoint/restore for durable persistence.

Follows the same pattern as the vector engine’s HNSW checkpoint: serialize all entries to bytes (MessagePack) → write to storage → restore via bulk_load on cold start.

Storage key scheme (in redb under Namespace::Spatial):

  • {collection}\x00{field}\x00rtree → serialized R-tree entries
  • {collection}\x00{field}\x00meta → SpatialIndexMeta

Structs§

RTreeSnapshot
Serialized R-tree snapshot (legacy MessagePack).
SpatialIndexMeta
Metadata for a persisted spatial index.

Enums§

RTreeCheckpointError
Errors during R-tree checkpoint operations.
SpatialIndexType
Type of spatial index.

Functions§

deserialize_meta
Deserialize index metadata from bytes.
meta_storage_key
Build the storage key for spatial index metadata.
rtree_storage_key
Build the storage key for an R-tree checkpoint.
serialize_meta
Serialize index metadata to bytes.