diff options
| author | tv <tv@krebsco.de> | 2026-12-01 03:23:21 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-01 03:45:00 +0000 |
| commit | b6743899468db6304173aca4c7b32d05ea8d92c9 (patch) | |
| tree | 96036989bc0bba94364cdf1b6a3aba73c3e8ae28 /src/remake/mod.rs | |
| parent | 80a1075951bdf70a4e9fb68e4a4228cfe0d27ba8 (diff) | |
remake: the switch worker looks when something changed, not every second
It read the remake records and its peers' epochs once a second, whatever
happened. It now looks when the records change, within a second of a
peer saying another epoch than this node's, and when a vote is due; and
by itself, once a second, only while something waits on time: a remake
of this epoch open or committed, a rejoin, a catch-up, a member on
another epoch. What it keeps for a time, an archived document or a
remake's content, it wakes for when that is due.
Diffstat (limited to 'src/remake/mod.rs')
| -rw-r--r-- | src/remake/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/remake/mod.rs b/src/remake/mod.rs index 90ae436..4847d5c 100644 --- a/src/remake/mod.rs +++ b/src/remake/mod.rs @@ -311,6 +311,10 @@ pub(crate) trait Host: Clone + Send + Sync + 'static { /// Makes the next sync count as initial again. fn reset_initial_sync(&self); + /// Resolves when the remake worker has something to look at that no change of the + /// document tells: a peer said another epoch than this node's. + fn remake_woken(&self) -> impl Future<Output = ()> + Send; + /// Store paths touched by each published document change. fn subscribe_changes(&self) -> broadcast::Receiver<Arc<ChangeSet>>; |
