diff options
| author | tv <tv@krebsco.de> | 2026-11-01 13:32:35 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-01 13:32:35 +0100 |
| commit | da76a3fd1eeb01b67cf7e281180bd4b677476d48 (patch) | |
| tree | fe6575311040e7989249aac0b7b2969dc1903e4d /src/remake/local.rs | |
| parent | e5f9e4ac47bf9efd6488395e40746cd83106f3fb (diff) | |
remake: log expired and missed votes
Diffstat (limited to 'src/remake/local.rs')
| -rw-r--r-- | src/remake/local.rs | 9 |
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() } |
