Expand description
Segment compaction: merge segments, drop deleted rows, re-encode.
Compaction reads one or more source segments along with their delete bitmaps, filters out deleted rows, and writes a new compacted segment. The caller is responsible for the atomic metadata swap (WAL commit marker → swap segment references → delete old files).
Triggered when a segment’s delete ratio exceeds the threshold (default 20%) or when the segment count exceeds a limit.
Re-exports§
pub use segment::CompactionResult;pub use segment::DEFAULT_DELETE_RATIO_THRESHOLD;pub use segment::compact_segment;pub use segments::compact_segments;