From 0fdfe7d6f35b1914f901c710b23f88c64773fa90 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 25 Oct 2026 20:09:39 +0100 Subject: only keep list of actor IDs within one epoch (fixup) --- src/remake/local.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/remake/local.rs') diff --git a/src/remake/local.rs b/src/remake/local.rs index 09c99bd..65a2735 100644 --- a/src/remake/local.rs +++ b/src/remake/local.rs @@ -55,8 +55,10 @@ struct Inner { content_fetches: HashSet<[u8; 32]>, /// Remakes this node coordinates now (`coordinator`). coordinating: HashSet, - /// Every actor this node writes or wrote with: one per run and epoch, and those of - /// earlier runs it knows of (`--document-file`). Its own writes, for a rejoin. + /// The actors this node writes or wrote with in the current document: this run's, + /// and those of earlier runs it knows of (`--document-file`). Its own writes, for a + /// rejoin. A switch or rejoin starts the list over with the new document's actor, so + /// it only grows with restarts within one epoch. own_actors: Vec, } @@ -158,6 +160,12 @@ impl RemakeState { } } + /// The current document is a new one, written with `actor` only (a switch or rejoin + /// is done). + pub(crate) fn reset_own_actors(&self, actor: ActorId) { + self.lock().own_actors = vec![actor]; + } + pub(crate) fn own_actors(&self) -> Vec { self.lock().own_actors.clone() } -- cgit v1.3.1