Conversation
* Set up 10 seconds deadline after gRPC client sending * The duration of deadline contains three segments: connecting, request and response For blocking stub, I just set deadline before invoke service. For bi-streaming stub, I found all of them are used as a blocking style, that after getting streaming response client stub just close current streaming. Base on above reality, I pick the same way as blocking one.
wu-sheng
reviewed
Jul 3, 2019
Member
wu-sheng
left a comment
There was a problem hiding this comment.
SegmentReport, Remote, and Exporter are all streaming, they are all streaming mode, this setup is the bug I was facing before.
Contributor
Author
|
I take a look at your original PR which is different from this one.
The correct approach is to set deadline just before invoking service
method. If we request steaming 10 times, 10 deadlines should be set to each
request.
Your approach was to set deadline at stub initial that is the wrong way of
using deadline
…On Wed, Jul 3, 2019, 9:59 AM 吴晟 Wu Sheng ***@***.***> wrote:
***@***.**** commented on this pull request.
SegmentReport, Remote, and Exporter are all streaming, they are all
streaming mode, this setup is the bug I was facing before.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2987?email_source=notifications&email_token=AAO6UWIXRFSD23I4MX6LAADP5QBX7A5CNFSM4H5AT5JKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB5KP4TY#pullrequestreview-257228367>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAO6UWOOBYX7HFB5PP2XMBTP5QBX7ANCNFSM4H5AT5JA>
.
|
wu-sheng
approved these changes
Jul 3, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adding deadline to gRPC client
request and response
For blocking stub, I just set the deadline before invoking service. For
bi-streaming stub, I found all of them are used as a blocking style,
that after getting streaming response client stub just close current
streaming. Base on the above reality, I pick the same way as blocking one.
Fixed #2972