You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
balancer: reduce lock scope in exact balance by splitting incNumConnections (#43862)
Commit Message:
Move the resource-limit bookkeeping (openConnections().inc()) outside
the critical section in
ExactConnectionBalancerImpl::pickTargetHandler(). Only the raw
connection counter increment, needed for balancing correctness, is held
under the lock; the ResourceLimit gauge update is deferred to after lock
release.
This is achieved by adding two optional virtual methods to
BalancedConnectionHandler with safe defaults:
- incConnectionCount(): increments only the balancing counter (defaults
to incNumConnections() for backward compatibility)
- postConnectionAccepted(): performs resource-limit bookkeeping
(defaults to no-op)
ActiveTcpListener overrides both to split the work that was previously
done in a single incNumConnections() call.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]
Signed-off-by: William Dauchy <william.dauchy@datadoghq.com>
0 commit comments