-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Merged
+96
−2
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5237c24
grpc side fixes
oandreeva-nv e82d5c7
Tests
oandreeva-nv 6857283
Clean up
oandreeva-nv cd34d14
Was validating stream infer
oandreeva-nv 707b3d9
Added delay for ModelInferHandler::Process for debug
oandreeva-nv 763070d
Test refactor
oandreeva-nv f0acc1a
Clean up
oandreeva-nv 2b14468
Clean up
oandreeva-nv 222c9a9
Converted tests to python
oandreeva-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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