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.
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
fix: Handling grpc cancellation edge-case:: Cancelling at step START #7325
fix: Handling grpc cancellation edge-case:: Cancelling at step START #7325
Changes from 8 commits
5237c24
e82d5c7
6857283
cd34d14
707b3d9
763070d
f0acc1a
2b14468
222c9a9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: what does the second clause here imply?
!= Steps::Cancelled ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid calling
StartNewRequest
twice, at first we fall into HandleCancellation and go through this block, which returnstrue
forresume
, so we will go intoif (state->IsGrpcContextCancelled())
loop for the second time but this timestate->context_->step_
isCANCELLED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Late to the game, but what is the reasoning of not moving the original "
StartNewRequest()
if at START" to before handling the cancellation? Although I think other code needs to be moved around as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% aware of all underlying processes, meaning
state->step_
andstate->context_->step_
combinations. This change helps to address the bug with known symptoms. Refactoring if theProcess
logic needs proper time and testing IMHOThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kthui thoughts? If feasible, this can be done as follow-up and by someone else. Want to make sure if there is room for improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think there is definitely room for improvement/refactoring, i.e. I think the
if (shutdown) { ... }
could also be moved into theif (state->step_ == Steps::START) { ... } else ...
block, so all procedures forSteps::START
would be inside theif (state->step_ == Steps::START) { ... }
block, but it can be done as a follow-up later.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jira ticket: DLIS-6831