-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Prevent resetAddrConn from re-adding addConn after being deleted by balancer #1354
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
@googlebot I signed it! |
CLAs look good, thanks! |
Thanks for debugging and reporting the issue. I think we could still use The root issue I'm seeing here is that,
The fix I'm proposing is that, we should check both |
Ignore this. It's a bit more complicated than that. |
Hi Thanks for your review. Yes, I think we should keep And in the scope of this PR, if we ensure that the |
Our release cycle is every 6 weeks. About this PR, I updated #1369 with some new changes, so we can replace transport not the addrConn. Please take a look at that. If we cannot include the fix for this in the next release (1.5.0), we can have a minor release (1.5.1) to include this later. |
#1369 has been merged, and the problem should be solved. |
I tried with the code at master and it worked fine. Thanks @menghanl |
@menghanl Can you tell me the date of the next release (1.5.1)? |
Sorry for delay. |
Great! Thank you. |
Closing this PR now. Thanks. |
Currently an addrConn is being added to the cc.conns without checking whether the address still exists in balancing targets list.
In some cases, for example, the client receives a goaway frame immediately after the addrConn has been deleted from the cc.conns list but before the tearDown of addrConn.
This causes a new addrConn will be added and an endless resetTransport loop begins.
This is easy to happen while shutting down multiple servers. The following loop will take enough time for some goaway frames to come.
https://github.com/grpc/grpc-go/blob/master/clientconn.go#L535