diff options
| author | tv <tv@krebsco.de> | 2026-12-01 02:22:36 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-01 02:22:36 +0000 |
| commit | 80a1075951bdf70a4e9fb68e4a4228cfe0d27ba8 (patch) | |
| tree | 48a6b108589a3646a5ec1ff6997f2b2e06547a9e /src/remake | |
| parent | d3c12b3951d4078ea8dda61a436d46cc85fa8f33 (diff) | |
remake: a node on a set of events follows no epoch
A node on a set alone, hearing peers of both kinds on a later epoch,
rejoined it, and filled the Automerge document it holds beside its set
with the snapshot: a set has no epochs, and that document stays empty.
A simulation of a compaction while a swarm is on its way to sets: the
nodes on the document and of both kinds switch, the node on a set stays,
and events go on between them through the node of both.
Diffstat (limited to 'src/remake')
| -rw-r--r-- | src/remake/switch.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/remake/switch.rs b/src/remake/switch.rs index ef616dc..3baa164 100644 --- a/src/remake/switch.rs +++ b/src/remake/switch.rs @@ -78,6 +78,12 @@ pub(crate) async fn run_worker<H: Host>(host: H) { } async fn check<H: Host>(host: &H) { + // A set of events has no epochs: the document a node holds beside one stays as + // it is, whatever epoch its peers of both kinds say. + #[cfg(feature = "federation")] + if host.holding().of_a_set() { + return; + } let local = host.current_epoch(); host.remake() .prune_archive(local.generation, host.now_millis()); |
