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

Don't mark calls as cancelled if they are successfully completed. #8408

Merged
merged 5 commits into from Aug 20, 2021

Conversation

temawi
Copy link
Contributor

@temawi temawi commented Aug 13, 2021

The semantics around cancel vary slightly between ServerCall and CancellableContext - the context should always be cancelled regardless of the outcome of the call while the ServerCall should only be cancelled on a non-OK status.

This fixes a bug where the ServerCall was always marked cancelled regardless of call status.

Fixes #5882

temawi added 4 commits Aug 11, 2021
… not OK. Also take care to mark the call as cancelled only if the context has a cancellation cause.
… not OK. Also take care to mark the call as cancelled only if the context has a cancellation cause.
# Conflicts:
#	core/src/main/java/io/grpc/internal/ServerCallImpl.java
… not OK. Also take care to mark the call as cancelled only if the context has a cancellation cause.
@linux-foundation-easycla
Copy link

@linux-foundation-easycla linux-foundation-easycla bot commented Aug 13, 2021

CLA Signed

The committers are authorized under a signed CLA.

@temawi temawi marked this pull request as ready for review Aug 16, 2021
@temawi temawi requested a review from ejona86 Aug 16, 2021
@temawi temawi assigned temawi and unassigned temawi Aug 16, 2021
Copy link
Member

@ejona86 ejona86 left a comment

Let's wait for the API review before merging. When merging, make sure to "squash" the many commits into one (rebase is for when 1 commit or a collection of commits you intend to keep separate).

You'll need to fixup the commit description when squashing. The text you have in the PR title+description is perfect, so just copy them to the commit description. See the example commit description in https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html if you are unfamiliar with the normal formatting. The seven rules from https://chris.beams.io/posts/git-commit/#seven-rules sum things up succinctly.

I tend to squash my commits before sending out the PR (or heavy use of --amend), and have the commit include the description I want to show up in the PR. If you only have one commit when creating a PR, github copies the subject/description from the commit.

We tend to prefix the commit summary with the component being modified, so here we'd prefix it with "core: ". Not a huge deal, but is helpful as it can shorten the title line while providing more context and make it easier to skim.

@temawi temawi self-assigned this Aug 20, 2021
@temawi temawi merged commit e45aab0 into grpc:master Aug 20, 2021
14 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants