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

Allow end stream to be dropped in the async server handler #1323

Merged

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Dec 9, 2021

Motivation:

The async server handler throws an error if the end-of-stream received
from the client is dropped. The end-of-stream will only be dropped if
the request stream has already been finished. This happens in a few
cases: either end-of-stream has already been received, or as a side
effect of the task running the user handler completing.

The latter case is possible of the user handler does not wait for end of
stream (if it encounters an error, for example). This happened
periodically in some tests as a result of the user handler completing
and receiving end-stream racing.

Modifications:

  • Tolerate dropping end stream in the async server handler.

Result:

Fewer flakey tests.

Motivation:

The async server handler throws an error if the end-of-stream received
from the client is dropped. The end-of-stream will only be dropped if
the request stream has already been finished. This happens in a few
cases: either end-of-stream has already been received, or as a side
effect of the task running the user handler completing.

The latter case is possible of the user handler does not wait for end of
stream (if it encounters an error, for example). This happened
periodically in some tests as a result of the user handler completing
and receiving end-stream racing.

Modifications:

- Tolerate dropping end stream in the async server handler.

Result:

Fewer flakey tests.
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Dec 9, 2021
@glbrntt glbrntt requested a review from fabianfett December 9, 2021 10:04
@glbrntt glbrntt merged commit a6d3157 into grpc:1.6.0-async-await Dec 9, 2021
@glbrntt glbrntt deleted the gb-tolerate-req-stream-finish branch December 9, 2021 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants