Expose Error Status To Caller#1682
Merged
Merged
Conversation
Contributor
|
One unfortunate outcome of this change seems to be that once an error occurs, the Stream will yield that error forever instead of terminating the stream on error as was done before. |
Contributor
|
@bmwill that sounds bad -- want to submit a PR to fix it? |
Contributor
|
@djc yeah happy to take a look at addressing the issue, assuming the behavior is a regression that the project would like fixed and not an change in behavior that it would like to keep. |
Contributor
|
I think that's a good assumption! |
bmwill
added a commit
to bmwill/tonic
that referenced
this pull request
Jul 26, 2024
PR grpc#1682 introduced a change to return the error Status to the user of Streaming but resulted in a change in behavior such that if an error occurs the Stream will never end and instead always yeild the error. This patch adjusts the semantics to only return the error one time and then terminates the stream by returning Poll::Ready(None) on subseqent calls.
Contributor
bmwill
added a commit
to bmwill/tonic
that referenced
this pull request
Jul 26, 2024
PR grpc#1682 introduced a change to return the error Status to the user of Streaming but resulted in a change in behavior such that if an error occurs the Stream will never end and instead always yeild the error. This patch adjusts the semantics to only return the error one time and then terminates the stream by returning Poll::Ready(None) on subseqent calls.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jul 26, 2024
) PR #1682 introduced a change to return the error Status to the user of Streaming but resulted in a change in behavior such that if an error occurs the Stream will never end and instead always yeild the error. This patch adjusts the semantics to only return the error one time and then terminates the stream by returning Poll::Ready(None) on subseqent calls.
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.
Motivation
We were seeing a high rate
Missing request messageerror on server side, but we do not know what exactly was going on.I think the error message may be hidden away in
poll_data.I am not sure why tonic choose to drop the error message instead of returning it to the user.
Can people familiar with the code explain why it was done in the current way?
Solution
return the error to users, so the error is more meaningful