-
Notifications
You must be signed in to change notification settings - Fork 409
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 bug that ExchangeReceiver is not cancelled if exception happens in union/agg block input stream #4285
Conversation
…n union/agg block input stream Signed-off-by: xufei <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
A little confuse about background "Due to the implementation of cancel, if a input stream is cancel once, all the subsequent cancels(including cancel(true)) will be ignored." . How input stream ensure to be canceled at most call once. |
|
oh, I see |
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.
LGTM
/// can not cancel parent inputStream or the exception might be lost | ||
parent.processor.cancel(false); /// Does not throw exceptions. | ||
/// kill the processor so ExchangeReceiver will be closed | ||
parent.processor.cancel(true); |
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.
why not also do parent.processor.cancel(true)
in handleException
?
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.
OK
Co-authored-by: Fu Zhe <[email protected]>
Co-authored-by: Fu Zhe <[email protected]>
Co-authored-by: Fu Zhe <[email protected]>
Signed-off-by: xufei <[email protected]>
/merge |
@windtalker: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 2feaf00
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/run-all-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4289. |
In response to a cherrypick label: new pull request created: #4290. |
…n union/agg block input stream (pingcap#4285) ref pingcap#4229
…n union/agg block input stream (pingcap#4285) ref pingcap#4229
Signed-off-by: xufei [email protected]
What problem does this PR solve?
Issue Number: ref #4229
Problem Summary:
some backgrounds:
BlockInputStream
, there is acancel(bool kill)
method to cancel the current and all its children input streams.UnionBlockInputStream/ParallelAggregatingBlockInputStream
, if some exception happens duringprocessor.process()
, it will cancel the BlockInputStream inprocessor
. However, it use silentcancel(false)
to do this, which will be ignored byTiRemteBlockInputStream
, so theremote_reader
inTiRemoteBlockInputStream
is not cancelled bycancel(false)
.cancel(true)
) will be ignored.cancel(true)
to cancel its BlockInputStream, and all theremote_reader
inTiRemoteInputStream
problem
If a input stream is cancelled due to exception in
UnionBlockInputStream/ParallelAggregatingBlockInputStream
, Cancel query can not cancel this input stream anymore, leavingremote_reader
un-cancelled, which may block the MPP query forever.What is changed and how it works?
In
UnionBlockInputStream/ParallelAggregatingBlockInputStream
, if some exception happens duringprocessor.process()
, usecancel(true)
to cancel the BlockInputStream inprocessor
.Check List
Tests
Side effects
Documentation
Release note