Skip to main content

Module hashmap_store

Module hashmap_store 

Source
Expand description

HashMap-based storage backend — drop-in replacement for the redb *Table layer.

§Architecture

Repository (unchanged)
  └─ Box<dyn BlockTable>
       ├─ BlockRedbTable     — old (serialize → B-tree → deserialize)
       └─ BlockHashMapTable  — new (HashMap::get → clone)

The store uses RwLock for interior mutability and thread safety, allowing &HashMapStore to be shared across threads via Arc.

Structs§

HashMapStore
All document data, held in plain HashMaps behind RefCell for interior mutability. One instance per DbContext, shared by all tables within a transaction scope via &HashMapStore.
HashMapStoreSnapshot
Owned deep copy of the entire store, used for savepoints.