aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/switch.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-29 02:48:25 +0000
committertv <tv@krebsco.de>2026-11-29 02:48:25 +0000
commit8a29efed857991417d12b8e21884dbbcb53ff4a0 (patch)
treef57da52ac22090146c3f3baac23fb0b5dd2938dc /src/remake/switch.rs
parentb259ee75fbbbf8e265a0bf2a0b79c4f6a75f395a (diff)
document: the writers a node wrote under are the document's, not a remake's
The actors a node writes or wrote with in its current document (document::own::OwnWriters, AppState::own_writers) were kept by the remake state, which signing, the document file, sync and a dropped change read them from. They are the engine's: a document of a kind without writers of this sort has none, and needs no remake state for them.
Diffstat (limited to 'src/remake/switch.rs')
-rw-r--r--src/remake/switch.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remake/switch.rs b/src/remake/switch.rs
index e56cd8c..ef616dc 100644
--- a/src/remake/switch.rs
+++ b/src/remake/switch.rs
@@ -254,7 +254,7 @@ async fn switch<H: Host>(
.filter(|snapshot| snapshot.epoch == expected);
let actor = ActorId::random();
- host.remake().add_own_actor(actor.clone());
+ host.own_writers().add(actor.clone());
let new_actor = actor.clone();
let node = host.node_id();
@@ -309,7 +309,7 @@ async fn switch<H: Host>(
// 3. Swap, replaying what arrived since the copy.
let (old, late) = swap_in(host, expected, new_doc, copy_heads, late_translator).await?;
stats.absorb(late);
- host.remake().reset_own_actors(new_actor);
+ host.own_writers().reset(new_actor);
// 4. Writes the remake had no place for wait for an operator (the old document
// holds them); the old document is kept as configured either way.