Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pool): Reset endpoints gauge on drop #2928

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

olix0r
Copy link
Member

@olix0r olix0r commented Apr 26, 2024

The p2c pool tracks an endpoints gauge that is incremented and decremented as endpoints are added and removed from the balancer. When a balancer is dropped, the proxy does not reset this gauge to 0. If the balancer is recreated later, this causes endpoints to appear to be double-counted.

This commit fixes this in two ways:

  1. When the balancer is dropped, the endpoints gauge is reset to 0.
  2. When the pool is reset (i.e., during initialization), we always reset the endpoints value rather than use individual inc/dec calls.

The p2c pool tracks an endpoints gauge that is incremented and decremented as
endpoints are added and removed from the balancer. When a balancer is dropped,
the proxy does not reset this gauge to 0. If the balancer is recreated later,
this causes endpoints to appear to be double-counted.

This commit fixes this in two ways:

1. When the balancer is dropped, the endpoints gauge is reset to 0.
2. When the pool is reset (i.e., during initialization), we always reset the
   endpoints value rather than use individual inc/dec calls.
@olix0r olix0r requested a review from a team as a code owner April 26, 2024 00:08
@olix0r olix0r merged commit 6a845fd into main Apr 26, 2024
15 checks passed
@olix0r olix0r deleted the ver/p2c-endpoints-gauge branch April 26, 2024 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant