Expand description
Physical storage design primitives for RedDB’s deterministic on-disk layout.
Re-exports§
pub use self::shm::provision_shm;pub use self::shm::read_shm_header;pub use self::shm::set_shm_provisioning_enabled;pub use self::shm::shm_path_for;pub use self::shm::shm_provisioning_enabled;pub use self::shm::ShmHandle;pub use self::shm::ShmHeader;pub use self::shm::ShmProvisionState;pub use self::shm::SHM_FILE_SIZE;pub use self::shm::SHM_HEADER_SIZE;pub use self::shm::SHM_MAGIC;pub use self::shm::SHM_VERSION;
Modules§
- shm
<data>.shmshared-memory file substrate (gh-475).
Structs§
- Block
Reference - Collection
Contract - Declared
Column Contract - Export
Descriptor - Grid
Layout - Manifest
Event - Manifest
Pointers - Physical
Analytics Job - Physical
Graph Projection - Physical
Index State - Physical
Layout - Physical
Metadata File - Physical
Tree Definition - Snapshot
Descriptor - Superblock
Header - WalPolicy
Enums§
- Artifact
State - Canonical artifact lifecycle states.
- Compaction
Policy - Contract
Origin - Manifest
Event Kind - Physical
Metadata Source
Constants§
- DEFAULT_
GRID_ BLOCK_ SIZE - DEFAULT_
MANIFEST_ EVENT_ HISTORY - DEFAULT_
METADATA_ JOURNAL_ RETENTION - Retention applied when the seq-N catalog journal is enabled at the
Maxtier. Seeseqn_journal_retention. - DEFAULT_
PAGE_ SIZE - DEFAULT_
SUPERBLOCK_ COPIES - OPT_
IN_ METADATA_ JOURNAL_ RETENTION - Retention applied when the seq-N catalog journal is opt-in enabled outside
of the
Maxtier — keeps forensics surface minimal on lower tiers. - PHYSICAL_
METADATA_ BINARY_ EXTENSION - PHYSICAL_
METADATA_ PROTOCOL_ VERSION
Functions§
- fold_
dwb_ into_ wal_ enabled - Whether the pager should fold DWB into WAL (no
<data>-dwbsidecar). Reads still tolerate the legacy sidecar so existing databases keep working through the flag flip. - fold_
pager_ meta_ enabled - Whether the pager should fold metadata into page 1 only and skip the
<data>-metasidecar shadow. Reads still tolerate the sidecar so existing databases keep working through the flag flip. - meta_
json_ sidecar_ enabled - Whether new metadata writes should additionally emit the JSON sidecar.
Defaults to
false; opt-in viaset_meta_json_sidecar_enabledor theREDDB_META_JSON_SIDECAR=1env var (escape hatch for ad-hoc debugging of a non-Max instance). Reads always tolerate either JSON or binary. - seqn_
journal_ enabled - Whether new metadata saves should also emit a seq-N journal entry.
- seqn_
journal_ retention - Resolved retention bound for the seq-N journal. Falls back to env
REDDB_SEQN_JOURNAL_RETENTION, then toOPT_IN_METADATA_JOURNAL_RETENTION(4) — the conservative off-tier baseline. - set_
fold_ dwb_ into_ wal_ enabled - Process-wide opt-in for folding the double-write buffer into the WAL via
full-page-image (FPI) records. When enabled, the pager does not open or
write
<data>-dwb; recovery rebuilds torn pages from FPI records replayed before normal redo. Defaults off. - set_
fold_ pager_ meta_ enabled - Process-wide opt-in for folding pager metadata (page 1) into the datafile
without an adjacent
<data>-metashadow. When enabled, the corruption- recovery shadow at<data>-metais not written; readers trust page 1 (plus its overflow chain) as the single source of truth. Defaults off. - set_
meta_ json_ sidecar_ enabled - Process-wide opt-in for the legacy
<data>.meta.jsonsidecar. Call once at startup after resolving the active [StorageLayout]. - set_
seqn_ journal_ enabled - Process-wide opt-in for the seq-N catalog journal (
<data>.meta.rdbx.seq-Nsnapshot trail). Defaults off so non-Maxtiers don’t accumulate forensic artifacts. Tier wiring should call this withtrueforMax. Escape hatch:REDDB_SEQN_JOURNAL=1. - set_
seqn_ journal_ retention - Process-wide retention for the seq-N catalog journal. Tier wiring should
call this with
DEFAULT_METADATA_JOURNAL_RETENTION(32) forMaxandOPT_IN_METADATA_JOURNAL_RETENTION(4) for opt-in non-Maxuse.0resets to defaults (env or off-tier baseline).