aboutsummaryrefslogtreecommitdiffstats
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
commit5b45a37dd4a99a94508f92ee67f540c3b3183c4f (patch)
treed175d899b222309427fa4d4471afa5417b3c3b32 /src/remake/switch.rs
parent041d61062e1bc6ceffbe520cf8062a534794ce39 (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 {