Expand description
Logical replication helpers shared by replica apply and point-in-time restore.
Structs§
- Logical
Change Applier - Shared logical change applier so replica replay and PITR converge on the same semantics. Stateful (PLAN.md Phase 11.5): tracks the last applied LSN + payload hash so duplicates / older LSNs / gaps / divergences are detected explicitly.
- Replica
Apply Metrics - PLAN.md Phase 11.5 — counters the replica apply loop bumps when an
invariant breaks. Surfaced via
reddb_replica_apply_errors_total. Decode errors aren’t strictly apply errors but they share the same observability lane so dashboards alert on “replica is ingesting trash from primary regardless of cause”.
Enums§
- Apply
Error Kind - Apply
Mode - Apply
Outcome - Outcome of a single
applycall.Appliedadvances the chain;IdempotentandSkippedare no-ops (we already saw an equal-or-newer LSN).GapandDivergence(returned viaLogicalApplyError) are fail-closed — callers (replica fetcher, restore loop) should mark the instance unhealthy and stop applying. - Logical
Apply Error