aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/changes.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-01 20:38:27 +0100
committertv <tv@krebsco.de>2026-11-01 20:38:27 +0100
commitae2a573e2753e1e7a11b94e2a721cb4d638079b3 (patch)
tree0a83dbba3a23a864f9024395e8e5abc4155dbf63 /src/swarm/changes.rs
parente293047c25d7167f25af0a611b33545f12225b05 (diff)
peer worker forget records on change
Diffstat (limited to 'src/swarm/changes.rs')
-rw-r--r--src/swarm/changes.rs12
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 }));