fix(clients): restore depleted clients on renewal and prioritize operator writes (#6987)

Restore usable clients when renewed, avoid duplicate reset updates, and prioritize operator writes in the serialized traffic writer. Preserve manual disables and keep every inbound consistent after traffic resets.
This commit is contained in:
Mahdi Fallahnejhad
2026-11-05 20:37:52 +03:30
committed by GitHub
parent e4935be861
commit dbb6212988
13 changed files with 684 additions and 92 deletions
+3 -1
View File
@@ -390,7 +390,9 @@ func (s *InboundService) SnapshotHasUnadoptedInbounds(nodeID int, snap *runtime.
// config push just landed, whose snapshot may still predate it (#6228).
func (s *InboundService) SetRemoteTraffic(nodeID int, snap *runtime.TrafficSnapshot, dirty, justPushed bool) (bool, error) {
var structuralChange bool
err := submitTrafficWrite(func() error {
// Node merges take the background lane: a per-client mutation the operator
// is waiting on must not queue behind the next batch of 5s snapshots.
err := submitTrafficWriteBackground(func() error {
var inner error
structuralChange, inner = s.setRemoteTrafficLocked(nodeID, snap, dirty, justPushed)
return inner