Skip to main content

Module segmented

Module segmented 

Source
Expand description

Segmented (LSM-style) storage backend built on the compaction engine.

This adapts CompactionManager โ€” a complete in-memory log-structured store (append to an active segment, seal, tombstone-on-delete, merge garbage-heavy segments) โ€” to the VectorStorage trait so it can be selected as a real backend. Deletes are tombstones reclaimed by background compaction rather than in-place removals, which keeps writes append-only and bounds read amplification by periodically merging segments.

Before DAK-7428 the compaction engine existed but was never wired to a storage interface โ€” it was reachable only from unit tests. This module makes it a functional backend (DAKERA_STORAGE=segmented) with self-contained background auto-compaction, not a simulated one.

Structsยง

SegmentedStorage
Log-structured, compaction-backed vector storage.