From 80a1075951bdf70a4e9fb68e4a4228cfe0d27ba8 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 1 Dec 2026 02:22:36 +0000 Subject: 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. --- src/remake/switch.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/remake/switch.rs') 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(host: H) { } async fn check(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()); -- cgit v1.3.1