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

addrConn: Report underlying connection error in RPC error #1855

Merged
merged 3 commits into from
Feb 14, 2018

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Feb 8, 2018

This only happens when the RPC failed because all addrConn was in TransientFailure. And this is best effort because the returned error might not be the real cause.
But it should be good enough to detect the reason when the ClientConn is "dead" (keep retrying but none of the connection works).

This is not a perfect solution because it's racy. But this should be a good workaround for most cases.

An ultimate solution would be to pass the errors as part of the connectivity state information to the balancers, and balancers pass those errors back to RPCs as a pick result. This would need API changes on balancers.

updates #1742
fixes #1633
fixes #1656

@menghanl menghanl changed the title Report underlying connection error in RPC error addrConn: Report underlying connection error in RPC error Feb 14, 2018
@menghanl menghanl merged commit 3926816 into grpc:master Feb 14, 2018
@menghanl menghanl deleted the rpc_error_connection_reason branch February 14, 2018 22:13
@menghanl menghanl added this to the 1.11 Release milestone Feb 27, 2018
@menghanl menghanl added the Type: Feature New features or improvements in behavior label Feb 27, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
2 participants