summaryrefslogtreecommitdiffstats
path: root/src/remake/switch.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-25 19:55:59 +0100
committertv <tv@krebsco.de>2026-10-25 19:55:59 +0100
commitceb4a494cca68d9275b85ba66917f4ccdb570bdb (patch)
tree195cc94543df7b0aacc89d0dc15a55c4583858e4 /src/remake/switch.rs
parent734676c1c4c9a93dc31993327c04c7e0c3fd0d30 (diff)
nodes keep list of every actor ID they've used
Diffstat (limited to 'src/remake/switch.rs')
-rw-r--r--src/remake/switch.rs5
1 files changed, 4 insertions, 1 deletions
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<H: Host>(
.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<ChangeHash>, ReplayStats), String> {
@@ -222,7 +225,7 @@ async fn switch<H: Host>(
}
// 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 {