-
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
client: propagate connection error causes to RPC statuses #4311
Merged
dfawley
merged 12 commits into
grpc:master
from
apolcyn:propagate_connection_close_error
Apr 13, 2021
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ba8e17b
Propagate errors causing connection close to RPC statuses
apolcyn 0640203
fix transport tests
apolcyn 38da1fd
Make test deterministic
apolcyn 05425bc
Address most review comments; TODO: find specific reason for ECONNRST
apolcyn 2096b3c
don't pass nil error to Close
apolcyn 29e6854
Don't pass nil to Close in keepalive test
apolcyn 622a2be
fix keepalive test
apolcyn 05ced4d
Fix keepalive test
apolcyn 83679d0
improve comment and test
apolcyn bb3a1ee
use WithBlock
apolcyn 1c4fb15
Revert use of WithBlock, go back to rpcStartedOnServer channel
apolcyn 6db7094
Address comments
apolcyn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use WithBlock
- Loading branch information
commit bb3a1eea5fcfca216243c53ddec3549bb3fa53ec
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default "wait for ready" behavior of RPCs should be fine for this, too. Are you sure this is necessary (and why)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this in because NI was still looking for a way to make sure that RPCs failed strictly after the client conn had found a healthy TCP connection for them to go out on, because I was seeing some flakes where the RPC failed with:
i.e., in some test flakes, the call to
ss.S.Stop()
caused server shutdown apparently before the RPC picked a connection.I dealt with this instead by just adding back the
rpcStartedOnServer
channel.BTW, AFAICS RPCs aren't actually using the
WaitForReady
call option, when using the stub server, right? I do seegrpc-go/internal/stubserver/stubserver.go
Line 120 in 950ddd3
WithBlock
, rather than theWaitForReady
call option.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops.. "wait for ready" is not what I meant - the default is not
WaitForReady
. But by default, RPCs should wait for the channel to go from connecting->ready (or transient failure, whis is not expected in tests).I'm not sure why that
waitForReady
call is in the stub server; we should probably remove it and do it in the tests that need it for whatever reason.But since you are using
ss.Start
which does thatwaitForReady
thing, I'm not sure why you'd be getting that RPC error with "connection refused". That seems like something we should look into.