Skip to main content

Module redo

Module redo 

Source
Expand description

Physical redo ops for the WAL (ADR-0012). Not Cypher text.

Catalog-DDL ops (CatalogIndexDetail, PutGraphType, SetCurrentGraphType) carry typed, serde-serializable payload models captured once at DDL-execution time. Graph::apply_redo stores them verbatim; it never re-parses Cypher text and never swallows a decode failure.

Re-exports§

pub use wal_format_json::props_from_json;
pub use wal_format_json::props_json;

Modules§

wal_format_json
The WAL’s on-disk JSON codec for redo property values (ADR-0078).

Structs§

IndexDetailSpec
Typed payload of RedoOp::CatalogIndexDetail: the catalog facts of a CREATE INDEX, captured once at DDL-execution time from the parsed clause. apply_redo stores it verbatim – it never formats a CREATE INDEX string and re-parses it.
IndexFacts
One index’s typed facts as every reader resolves them, through the fixed precedence the SHOW INDEXES row and the 00NA0 note share: the index’s IndexDetailSpec, then the owning constraint (a constraint-backed index), then the legacy IndexDef encoding. No reader re-spells the chain, so a new detail field lands in every rendering at once.
ServingPairConstraint
The constraint side of an ADR-0372 serving-pair check.
ServingPairIndex
The index side of an ADR-0372 serving-pair check: the rule’s kind, entity kind, labels, and properties, as the creating statement spells them (or as the materialized index_details record them).

Enums§

CatalogName
One catalog name a RedoOp mentions (RedoOp::catalog_names), in the namespace it belongs to. Borrowed from the op — the derivation never copies a name.
IndexKindSpec
The DDL index kind carried by IndexDetailSpec: a serde-serializable mirror of relate_parser::IndexKind.
OntologyOp
Typed view of a store-level ontology document op (ADR-0120 §3), the classification RedoOp::ontology_op returns: Set borrows the verbatim document, Drop carries nothing. Consumers match this once instead of re-matching the redo variants.
PullKind
Node vs relationship for RedoOp::PullIdentityPut.
RedoOp
WriteTarget
What an op writes (ADR-0015 conflict classification). Total over RedoOp: a delete is also a mutation of the same element, CreatedRel carries the endpoints, and catalog ops carry their (borrowed) identity — consumers match once and bind everything from the classification.

Constants§

MAX_ONTOLOGY_SPEC_BYTES
The ADR-0086 object envelope bounding one ontology document (ADR-0120 §3): 16 MiB, checked before the commit is written.

Functions§

legacy_property_encoding
Encode an IndexDef.property in the legacy {property}#{KIND}#{name} format — the encoder half of split_legacy_property_encoding, which decodes the result back to (property, Some(kind)).
legacy_property_names
Decode a legacy IndexDef.property string into its property-name list: the comma-join head of split_legacy_property_encoding split back into names (a bare single property name is its own one-element list). The list half of the format’s decoder pair — every reader that wants the names (not the raw head) decodes through here, never an inline comma split one layer above the canonical decoder.
project_index_details
Apply the catalog index ops in ops to details. This is the speculative projection estimate_redo_delta uses; committed replay in apply_redo stores the same two ops.
serving_pair_conflicts
ADR-0372’s serving-pair conflict, the one canonical form, owning the whole match: the pair’s typed fields in, the verdict out. A schema rule pair conflicts only when the index kind is RANGE — the only kind that can serve a constraint’s backing (ADR-0339) — and the constraint is index-backed (uniqueness/key), on the same label and properties. Property-type/existence constraints and FULLTEXT/VECTOR/POINT indexes coexist with everything. All three creation directions consult this; a change to the rule lands here once.
split_legacy_property_encoding
Decode a legacy IndexDef.property string: split the value catalog_create_index (and the constraint-backed index path) into its props head and index kind. A bare property name (no #) is its own head with no kind. The single decoder for this format — every reader of IndexDef.property goes through here.