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 materialize::materialize_segment_live_rows;pub use segment::CompactionResult;pub use segment::DEFAULT_DELETE_RATIO_THRESHOLD;pub use segment::compact_segment;pub use segments::compact_segments;
Modules§
- extract
- Shared helper: materialize a row value from a DecodedColumn.
- materialize
- Materialize live (non-deleted) rows from a flushed segment blob.
- segment
- Single-segment compaction: drop deleted rows from one segment, write a new one.
- segments
- Multi-segment compaction: merge multiple sources into a single new segment.