Skip to main content

Crate ozzy_replication

Crate ozzy_replication 

Source
Expand description

Deterministic replication with explicit network and storage evidence.

This core implements normal operation, durable view-change initiation, and log selection and installation for three fixed durable voters. Intact-disk restart leaves the last installed normal view or resumes an unfinished promise, never old primary authority. Lost-state recovery has a bounded fresh-quorum admission, streamed validation, and wire codecs. The runtime journal worker owns immutable donor pins and the segment store has a nonvoting publication gate. Runtime receiving workers and OMQ recovery actors validate transferred history before handing off to fenced restart, never directly to voting. Payload validation, persistence, transport, and deterministic application are separate adapters. Normal metadata storage is preallocated and byte-bounded.

Modules§

driver
Deterministic normal-to-election scheduling with explicit durable completions.
flow
Bounded local retention and receipt accounting, independent of consensus and durability.
local
Explicit single-broker authority and local-durable confirmation.
recovery
Fresh-quorum admission for a fixed voter that lost its previous state.
wire
Bounded native replica messages. No I/O or implicit consensus authority.

Structs§

Commit
Primary’s cumulative commit announcement, also usable as an idle heartbeat.
Configuration
Three ordered, distinct voters. Confirmation needs synchronized history on the leader and one backup.
ConfigurationRecord
Canonical immutable configuration for three authenticated durable voters.
ConfiguredVoter
One persistent voter and its independently authenticated principal binding.
Digest
A fixed-width digest or externally supplied identity fingerprint. Computed integrity digests contain XXH3-128 followed by 16 zero bytes; see crate::integrity. External principal fingerprints remain opaque.
DoViewChange
Second view-change phase. A bounded descriptor, never an unbounded log frame.
FrozenLog
One immutable, synchronized log description for a view-change report.
InstallTicket
Exact selected-log publication action. Not evidence of successful I/O.
InstallingView
In-flight atomic installation. Neither old nor new normal voting is exposed.
JournalGeneration
One active journal writer incarnation, supplied by the owning runtime.
LogSource
Exact source against which transferred history must be verified.
NormalReplica
Fixed-three-voter normal VSR path with a bounded pipelined prepare window.
OpNumber
Contiguous group-operation prefix. Zero denotes the empty journal.
PipelineLimits
Bounds on live prepare metadata/payloads and each streamed validation chunk. Frozen recovered/installed history can exceed these bounds and stays on disk.
Prefix
Exact canonical group prefix. Zero with the zero digest is genesis.
PrepareOk
Cumulative durable PREPARE_OK. Sender identity comes from authentication.
PreparedOperation
Metadata for one already validated canonical operation.
PromiseTicket
Storage action that persists a view promise without installing a normal view.
ReceivedStart
A START_VIEW with the authenticated configured voter that sent it. Backup installation still checks that this voter is the view’s primary.
RecoveredState
Intact durable state independently validated and synchronized on startup.
RejectedInstallation
Rejected admission together with the original fenced role.
ReplicaSnapshot
Read-only normal state, suitable for adapter scheduling and invariant checks.
Scope
Immutable identity and consensus generation carried by normal messages.
SelectedView
Verified view-change selection, not installed leadership authority.
StartView
Immutable START_VIEW sent only after the primary durably installs this log. Sender identity comes from the authenticated configured primary.
StartViewChange
First view-change phase. Sender identity comes from the authenticated peer.
SyncTicket
Prefix captured when a synchronization request is issued.
ViewChange
Fixed-three-voter durable view-change initiation and log selection.
WriteTicket
One admitted, indivisible local write group. Fields cannot be forged externally.

Enums§

Admission
Result of atomically validating a complete prepare group.
ConfigurationRecordError
Rejected durable configuration. No error permits silently replacing membership.
InstallOutcome
Exactly one owned protocol role after installation.
ReplicationError
Rejected replication event. Capacity and missing history are recoverable; conflicting current lineage faults the normal core.
Status
Whether the normal protocol may emit votes, commit, or apply.
ViewChangeError
Rejected election event. Missing history/quorums wait; conflicts fault.

Constants§

CONFIGURATION_RECORD_BYTES
Exact encoded length of a fixed-three-voter durable configuration.