Expand description
Primary-side replication: WAL record production and snapshot serving.
The logical WAL spool byte format is a reddb-file contract. This module
owns runtime policy: appending after writes, syncing acknowledged records,
serving replica pulls, and pruning once slots make records removable.
Structs§
- Logical
WalSpool - Durable append-only logical WAL spool kept beside the main
.rdbfile. - Primary
Replication - Primary replication manager.
- Replica
State - State of a connected replica. PLAN.md Phase 11.4 fields:
last_seen_at_unix_msupdates on every interaction (pull or ack);last_sent_lsnupdates when the primary serves apull_wal_recordsbatch;last_durable_lsnupdates when the replica reports its WAL is durably written viaack_replica_lsn. - Replication
Progress - Primary-side replication progress derived from the replica registry.
- WalBuffer
- In-memory WAL buffer for replication. Primary appends records here; replicas consume from it.
Enums§
- Resume
Mode - How a replica’s pull should be served, decided from its slot state.