-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Canceling/dropping an execution plan should cancel/drop all inner tasks #1103
Labels
bug
Something isn't working
Comments
I'm actively working on this issue. |
Ref #928 as it is at least somewhat related. |
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 11, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 12, 2021
alamb
pushed a commit
that referenced
this issue
Oct 12, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 13, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 13, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 13, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 13, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 14, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 14, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 14, 2021
Dandandan
pushed a commit
that referenced
this issue
Oct 14, 2021
…ergeExec`, `WindowAggExec` (#1112) * allow `BlockingExec` to mock multiple partitions * Clean up spawned task on `SortPreservingMergeExec` drop Ref #1103. * Clean up spawned task on `WindowAggExec` drop Ref #1103. * isolate common test code * Clean up spawned task on `RepartitionExec` drop Ref #1103. * rename variables / fix copy+paste mistake * introduce `RepartitionExecState` struct * introduce `AbortOnDrop{Single,Many}` helpers
With the merge of #1112 is there anything left for this ticket? |
Yes, a few more. Will open a PR later today. |
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 15, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 15, 2021
crepererum
added a commit
to crepererum/arrow-datafusion
that referenced
this issue
Oct 15, 2021
As a side-effect, cancelation now works with all users of `RecordBatchReceiverStream` (e.g. `ParquetExec`) but there the effect should be slightly less important. Ref apache#1103.
houqp
pushed a commit
that referenced
this issue
Oct 16, 2021
…xec`, `HashAggregateExec` (#1121) * Clean up spawned task on `HashAggregateExec` drop Ref #1103. * Clean up spawned task on `CoalescePartitionsExec` drop Ref #1103. * Clean up spawned task on `AnalyzeExec` drop As a side-effect, cancelation now works with all users of `RecordBatchReceiverStream` (e.g. `ParquetExec`) but there the effect should be slightly less important. Ref #1103.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Canceling futures in Rust is usually quite easy: just
drop
them. However DataFusion has a few places where it usestokio::spawn
to create new, independent execution flows and forgets to wire up theJoinHandle
s in a way that dropping the owning future/stream would also drop the sub-flow.The sub-flow is usually connected using a
futures::channel::oneshot::channel
, so dropping the receiver side (the original future/stream) leads to error on the sender side (the sub-flow). Furthermore the sender side can test if the channel was cancelled. However this only works as long as the control flow on the sender side actually tries to send something. For long-running external IO (e.g. pulling data from an object store) or UDFs, this cancellation can be a bit late.To Reproduce
ExecutionPlan
that emit streams that are foreverPending
SortExec
(for example, other operators also have this issue)SortExec
, it will bePending
SortExec
Expected behavior
At least after a short while, the input should be dropped as well even when it is pending forever.
Additional context
This affects master commit
90a4c8435152841117c957a74ea4d046815d6c6a
.The text was updated successfully, but these errors were encountered: