Skip to content

Adding deadline to gRPC client#2987

Merged
wu-sheng merged 2 commits intomasterfrom
grpc/deadline
Jul 3, 2019
Merged

Adding deadline to gRPC client#2987
wu-sheng merged 2 commits intomasterfrom
grpc/deadline

Conversation

@hanahmily
Copy link
Contributor

Adding deadline to gRPC client

  • 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 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

 * 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.
@hanahmily hanahmily added agent Language agent related. backend OAP backend related. feature New feature labels Jul 2, 2019
@hanahmily hanahmily added this to the 6.3.0 milestone Jul 2, 2019
Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SegmentReport, Remote, and Exporter are all streaming, they are all streaming mode, this setup is the bug I was facing before.

@hanahmily
Copy link
Contributor Author

hanahmily commented Jul 3, 2019 via email

@wu-sheng wu-sheng merged commit 01b963c into master Jul 3, 2019
@wu-sheng wu-sheng deleted the grpc/deadline branch July 3, 2019 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Language agent related. backend OAP backend related. feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add deadline to all gRPC including stream and block stubs

2 participants