diff options
Diffstat (limited to 'src/swarm/changes.rs')
| -rw-r--r-- | src/swarm/changes.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/swarm/changes.rs b/src/swarm/changes.rs index 7f3c2e9..8565cb6 100644 --- a/src/swarm/changes.rs +++ b/src/swarm/changes.rs @@ -1,6 +1,7 @@ //! The change publisher: after document changes, which store paths they touched //! (`AppState::change_events`, for the API's streams, the dashboard and remakes), and -//! a nudge to topology when the member list changed. +//! a nudge to topology when the member list changed, and to the peer worker when the +//! forget records did. use std::sync::Arc; @@ -62,6 +63,15 @@ pub(crate) async fn run_change_publisher(state: AppState) { { state.topology_changed.notify_one(); } + if paths + .iter() + .any(|path| crate::swarm::peer::affects_forget_records(path)) + { + state + .forget_records_changed + .store(true, std::sync::atomic::Ordering::Release); + state.peers_due.now(); + } // Fails only when nobody is subscribed. let _ = state.change_events.send(Arc::new(ChangeSet { paths })); |
