aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/catchup.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/catchup.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/catchup.rs')
-rw-r--r--src/remake/catchup.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/remake/catchup.rs b/src/remake/catchup.rs
index b8dc1b9..685385a 100644
--- a/src/remake/catchup.rs
+++ b/src/remake/catchup.rs
@@ -279,7 +279,7 @@ async fn start<H: Host>(host: &H, local: Epoch, target: Epoch, attempts: u32) {
}));
let actor = ActorId::random();
- host.remake().add_own_actor(actor.clone());
+ host.own_writers().add(actor.clone());
// At once: the fresh document takes no writes until the rejoin is done; a ready
// node's document so far answers reads, marked stale, and takes its writes
// meanwhile (`Host::begin_rejoin`).
@@ -386,7 +386,7 @@ async fn finish<H: Host>(host: &H) {
// meanwhile, and those after `began` are replayed under the lock in the end.
let copy = host.read_doc(|doc| doc.clone()).await;
let kept = host.rejoin_document().await;
- let own = host.remake().own_actors();
+ let own = host.own_writers().all();
let now = host.now_millis();
#[cfg(feature = "federation")]
let (holding, store) = (host.holding(), host.store_id());
@@ -560,7 +560,7 @@ async fn finish<H: Host>(host: &H) {
);
host.remake().set_catch_up(None);
let actor = host.read_doc(|doc| doc.get_actor().clone()).await;
- host.remake().reset_own_actors(actor);
+ host.own_writers().reset(actor);
info!(
from = %previous,
@@ -578,7 +578,7 @@ async fn finish<H: Host>(host: &H) {
/// Verifies the synced document `copy` and decides about the old document's own
/// changes: those up to `began` (when the rejoin began) by the replay window, those
/// after it (made during the rejoin) whatever it says. `own`: this node's actors
-/// (`RemakeState::own_actors`); the old document's own actor counts in any case.
+/// (`document::own::OwnWriters`); the old document's own actor counts in any case.
/// `now`: Unix milliseconds, by the node's clock.
fn prepare(
copy: &Document,