Recover replicas from compacted shard history

This commit is contained in:
Meta Vens 2026-05-19 21:07:46 +01:00
commit c2b2239853
9 changed files with 486 additions and 10 deletions

View file

@ -87,7 +87,9 @@ CultMesh can persist authoritative shard logs through
log per shard, so a restarted primary can still serve replica catch-up without
depending on warm process memory. When retained log history is compacted, stale
replicas get an explicit resync requirement instead of a partial log pretending
to be enough.
to be enough. The replicator can answer that by fetching a shard-bounded
snapshot, replacing the local shard view, and advancing its cursor to the
snapshot's represented log sequence.
## Documentation

View file

@ -60,7 +60,9 @@ cursors can be stored with `ICultNetShardReplicaCursorStore`. Authoritative
shard logs can be persisted with `ICultNetShardMutationLogStore`; the file
implementation stores one MessagePack log per shard so catch-up survives a
primary restart. Compacted history returns an explicit resync requirement so a
replica can fall back to a snapshot before applying newer log entries.
replica can fall back to a shard-bounded snapshot before applying newer log
entries. Applying that snapshot replaces the local shard view and advances the
replica cursor to the snapshot's represented log sequence.
### Simulation Witness Consensus