Expand description
Unified Segment System
Implements the Growing → Sealed segment lifecycle pattern. Segments are the fundamental unit of storage that handle entities of all types.
§Write Path
- WAL write (durability)
- Growing-segment entity storage in RAM (HashMap mode or flat-vector mode with epoch-published lock-free reads)
seal()freezes the growing segment into a Sealed segment and builds pruning summaries over the immutable data
§Read Path
- Growing segment entity storage (most recent writes)
- Sealed segments (older, immutable, zone-map guarded)
§Lifecycle
Growing (in-memory, accepts writes)
↓ seal() when full or manually triggered
Sealed (immutable, zone maps built)
↓ flush() for persistence
Flushed (on disk, can be mmap'd)
↓ archive() for cold storage
Archived (compressed, infrequently accessed)Structs§
- ColZone
- Tracks the min and max observed
Valuefor one column in a segment. Used to skip segments that cannot satisfy a range or equality predicate. - Graph
Index Cursor - One indexed key at a time, with an exclusive resume ID and a source-wide upper bound captured before any batch. MVCC is checked during live hydration.
- Growing
Segment - Growing segment implementation (in-memory, writable)
- Multi
ColZone - Segment
Config - Configuration for segments
- Segment
Scan Cursor - Stable append-only positions, bounded when a scan opens the segment.
- Segment
Stats - Segment statistics
Enums§
- Graph
Entity Kind - The two physical kinds used by graph materialization passes.
- Segment
Error - Segment error types
- Segment
State - Segment state in its lifecycle
- Zone
ColPred - A predicate on a single column that can be checked against a
ColZone. - Zone
ColPred Kind - Tag-only variant of
ZoneColPred— used where the Value is stored separately.
Constants§
- CHECKPOINT_
MUTATIONS_ MAX - Maximum distinct dirty physical IDs tracked per segment and checkpoint projection.
- SCAN_
BATCH_ SIZE - Maximum physical positions examined under one segment read guard.
Traits§
- Unified
Segment - A unified segment that stores all entity types
Type Aliases§
- Segment
Id - Unique identifier for a segment