From 866924934d635df8a8f222a022f806c44581a5f5 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 25 Oct 2026 19:55:59 +0100 Subject: nodes keep list of every actor ID they've used --- src/remake/switch.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/remake/switch.rs') diff --git a/src/remake/switch.rs b/src/remake/switch.rs index cf5ea75..e78643a 100644 --- a/src/remake/switch.rs +++ b/src/remake/switch.rs @@ -205,6 +205,9 @@ async fn switch( .take_prebuilt(id) .filter(|snapshot| snapshot.epoch == expected); + let actor = ActorId::random(); + host.remake().add_own_actor(actor.clone()); + // 2. Build (or reuse), verify and replay without holding any lock. let (new_doc, copy_heads, mut stats) = tokio::task::spawn_blocking( move || -> Result<(AutoCommit, Vec, ReplayStats), String> { @@ -222,7 +225,7 @@ async fn switch( } // A fresh actor: this node's writes in the new epoch. - let mut doc = snapshot.doc.with_actor(ActorId::random()); + let mut doc = snapshot.doc.with_actor(actor); // Keep this remake's record visible in the new epoch, for its history. if carry_record { -- cgit v1.3.1