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
commit6d9b462e1bb1e2ebbda6c0dcdcfe22a15d4b4cbe (patch)
tree73a7ece5215045c374ed3b928a8d36b220d50e19 /src/swarm/changes.rs
parentdbb614e1ecf27ca37f54dba4e2c8fe3810af8c8c (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 }));