-
Notifications
You must be signed in to change notification settings - Fork 598
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
feat(batch): abort task #2757
Merged
Merged
feat(batch): abort task #2757
Conversation
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
Codecov Report
@@ Coverage Diff @@
## main #2757 +/- ##
==========================================
+ Coverage 72.61% 72.67% +0.05%
==========================================
Files 700 700
Lines 91145 91259 +114
==========================================
+ Hits 66182 66318 +136
+ Misses 24963 24941 -22
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
lmatz
force-pushed
the
lz/abort_task
branch
4 times, most recently
from
May 24, 2022 13:38
87a00b4
to
3055a2a
Compare
lmatz
commented
May 24, 2022
liurenjie1024
approved these changes
May 25, 2022
Enter-tainer
pushed a commit
that referenced
this pull request
May 26, 2022
* feat(batch): abort task * revision * make wait_until_task_aborted private and test-only
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's changed and what's your intention?
Abort batch tasks on CN. The RPC just sends the message to notify the task that it should abort, but it does not wait for the task to abort successfully.
Part of handling task execution failure, i.e. when one task fails, the scheduler should be able to notify other batch tasks of the same query to abort and thus release the resources.
Introduce a new channel in the
TaskExeuction
to notify the spawned execution that its task needs to be aborted.The spawned execution
select
on both the stream of a data chunk and the stream of this new channel's receiver, so that whenever the abort message is sent, the task will immediately be aborted.Turn
try_execute
into a member function by makingself
aArc<Self>
so that the task'sstate
can be set more easily.Checklist
Refer to a related PR or issue link (optional)
#1977