aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/local.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/remake/local.rs')
-rw-r--r--src/remake/local.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/remake/local.rs b/src/remake/local.rs
index e94657c..e8fc9eb 100644
--- a/src/remake/local.rs
+++ b/src/remake/local.rs
@@ -60,6 +60,9 @@ struct Inner {
coordinating: HashSet<String>,
/// The remake this node is about to vote for, and when (`vote_due`).
vote_due: Option<(String, UnixMillis)>,
+ /// Remakes this node could have voted for but saw expire first (`vote::cast`), each
+ /// logged once.
+ missed: HashSet<String>,
/// 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
@@ -215,6 +218,12 @@ impl RemakeState {
}
}
+ /// Notes that this node saw `remake` expire without having voted for it: true the
+ /// first time.
+ pub(crate) fn missed(&self, remake: &str) -> bool {
+ self.lock().missed.insert(remake.to_owned())
+ }
+
fn lock(&self) -> MutexGuard<'_, Inner> {
self.inner.lock_or_recover()
}