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
commit866924934d635df8a8f222a022f806c44581a5f5 (patch)
tree43add97297eaf20f31877657bb893bec078cea29 /src/remake/switch.rs
parentfbfc766d80005dd5686c9acc1f8c16883c5e1ccc (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 {