summaryrefslogtreecommitdiffstats
path: root/src/remake/local.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-25 20:09:39 +0100
committertv <tv@krebsco.de>2026-10-25 20:09:39 +0100
commit0fdfe7d6f35b1914f901c710b23f88c64773fa90 (patch)
tree235c99c64f8ee6b6f6a5308e5a661df8e065a415 /src/remake/local.rs
parent6d09b81329d33deb7e2ee614aa0c3025555c0f14 (diff)
only keep list of actor IDs within one epoch (fixup)
Diffstat (limited to 'src/remake/local.rs')
-rw-r--r--src/remake/local.rs12
1 files changed, 10 insertions, 2 deletions
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<String>,
- /// 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<ActorId>,
}
@@ -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<ActorId> {
self.lock().own_actors.clone()
}