Expand description
Memtable freeze-and-flush mechanism.
This module implements the lifecycle of a memtable: freeze the active
memtable (making it immutable), swap in a fresh one, flush the frozen
memtable to a segment file via SegmentWriter, and optionally truncate
the WAL up to the flushed sequence number.
§Flush triggers
Flush is triggered when:
estimated_size > memtable_flush_threshold- A time-shard boundary is crossed
§Memory bounds
If the combined size of active + frozen memtables exceeds
max_memtable_memory, new inserts are rejected with
MemtableError::CapacityExceeded.
Structs§
- Flush
Config - Configuration for the flush controller.
- Flush
Controller - Manages the active and frozen memtable lifecycle.
- Flush
Result - Result of a flush operation for a single measurement.