Expand description
The engine tying the write and read paths together.
Sub-ms writes: Table::put appends to the WAL without fsyncing, upserts
the skip-list memtable, and updates the in-memory HOT index + secondary
indexes. A batch-driven Table::commit does the group fsync and bumps the
epoch. Table::flush commits, drains the memtable into an immutable sorted
run, and rotates the WAL. Reads merge versions across the live memtable and
all sorted runs (Table::get, Table::visible_rows).
Structs§
- Approx
Result - Point estimate with a normal-theory confidence interval from the reservoir
sample (Phase 8.2).
ci_low/ci_highbracketpointat the requested z-score; the interval has zero width when the sample equals the whole table. - Cached
Agg - A cached incremental aggregate (Phase 8.3): the mergeable state, the row-id
watermark it covers (rows
[0, watermark)), and the snapshot epoch. - Column
Stat - Exact aggregate of a column’s page stats into a min/max/null_count triple
(Phase 7.1). Only meaningful when the owning table is insert-only, which
Table::exact_column_statsgates on. - Incremental
AggResult - Outcome of
Table::aggregate_incremental. - Read
Generation - S1C-001: an immutable, atomically-published table read view — the
engine-layer counterpart of
database::TableReadGeneration. Readers pin anArc<ReadGeneration>; writers publish a replacement with a singleArcSwapstore (Table::publish_read_generation) after sealing their active deltas, so no write ever clones the complete table/index set merely because readers exist: every captured piece is either anArcshare of immutable frozen layers or a small metadata copy. - Table
- An open MongrelDB table.
- Table
Deltas - The sealed in-memory deltas captured with a
ReadGeneration: memtable, mutable-run tier, HOT primary-key index, and the reverse primary-key map. Each is a post-seal clone — frozen layers areArc-shared with the writer, the active delta is empty — so capturing copies no row data, and pinning the view keeps exactly the frozen layers it captured alive.
Enums§
- AggState
- A mergeable running aggregate state (Phase 8.3). Two states over disjoint
row sets
mergeinto the state over their union, so a cached analytical aggregate can be updated by merging in only the delta (newly inserted rows) instead of a full recompute. - Approx
Agg - A supported approximate aggregate over the reservoir sample (Phase 8.2).
- Index
Build Policy - When a bulk load (
bulk_load/bulk_load_columns/bulk_load_fast) builds the live in-memory indexes. - Native
Agg - A supported native aggregate (Phase 7.2).
- Native
AggResult - The typed result of a
NativeAggover a column.