mapper, change: coalesce duplicate policy recomputes per tick

Deduplicate broadcast policy changes within a tick so peers don't recompute
their netmap more than needed during a reconnect storm.

Updates #3293
This commit is contained in:
Kristoffer Dalby 2026-06-03 13:21:59 +00:00
parent 7706552c99
commit cffdb77c8b
4 changed files with 197 additions and 0 deletions

View file

@ -630,6 +630,9 @@ func (b *Batcher) processBatchedChanges() {
return true
}
// One policy recompute rebuilds the whole netmap; drop same-tick repeats.
pending = change.DedupePolicyChanges(pending)
// Queue a single work item containing all pending changes.
// One item per node ensures a single worker processes them
// sequentially, preventing out-of-order delivery.