Skip to main content

Module engine

Module engine 

Source
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§

ApproxResult
Point estimate with a normal-theory confidence interval from the reservoir sample (Phase 8.2). ci_low/ci_high bracket point at the requested z-score; the interval has zero width when the sample equals the whole table.
CachedAgg
A cached incremental aggregate (Phase 8.3): the mergeable state, the row-id watermark it covers (rows [0, watermark)), and the snapshot epoch.
ColumnStat
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_stats gates on.
IncrementalAggResult
Outcome of Table::aggregate_incremental.
Table
An open MongrelDB table.

Enums§

AggState
A mergeable running aggregate state (Phase 8.3). Two states over disjoint row sets merge into 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.
ApproxAgg
A supported approximate aggregate over the reservoir sample (Phase 8.2).
IndexBuildPolicy
When a bulk load (bulk_load / bulk_load_columns / bulk_load_fast) builds the live in-memory indexes.
NativeAgg
A supported native aggregate (Phase 7.2).
NativeAggResult
The typed result of a NativeAgg over a column.

Constants§

CACHE_DIR
KEYS_FILENAME
META_DIR
RCACHE_DIR
RUNS_DIR
SCHEMA_FILENAME
WAL_DIR