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: Ignore state change for replaced subConns. #49

Merged
merged 2 commits into from
Apr 21, 2023
Merged

Conversation

nimf
Copy link
Collaborator

@nimf nimf commented Apr 14, 2023

When a replaced subConn shuts down, the balancer receives a READY->SHUTDOWN state change notification for that subConn. If we process this as usual, then we decrement ready channels count in the connectivityStateEvaluator. This will eventually lead to the aggregated state of the balancer being reported as TRANSIENT_FAILURE. This, in turn, infinitely blocks sending any RPC calls.

When a replaced subConn shuts down, the balancer receives
a READY->SHUTDOWN state change notification for that subConn.
If we process this as usual, then we decrement ready channels count
in the connectivityStateEvaluator. This will eventually lead to the
aggregated state of the balancer being reported as TRANSIENT_FAILURE.
This, in turn, infinitely blocks sending any RPC calls.
@nimf nimf requested a review from lasradoVinod April 14, 2023 22:29
@lasradoVinod
Copy link
Collaborator

As discussed can we make sure that the code works in case of old connection shutting down before refresh connection comes up.
nit: Maybe we can also find a way to improve readability for recordTransition function.

@nimf
Copy link
Collaborator Author

nimf commented Apr 19, 2023

Added the test. Will refactor the whole aggregated state evaluator stuff in a future PR.

@nimf nimf merged commit 1fecd99 into main Apr 21, 2023
@nimf nimf deleted the fix-state-change branch April 21, 2023 17:46
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.

2 participants