TDLR is that ensuring that launched tasks are properly cleaned up (and panics are propagated back to the main tasks) is tricky.
Tokio has a tokio::task::JoinSet which handles the cleanup part and #6507 demonstrates how to use JoinSet to propagate panics.
We should ideally also fix
datafusion/core/src/physical_plan/repartition/mod.rs to propagate panics
and remove AbortOnDrop andAbortOnDropMany with JoinSet
Originally posted by @crepererum in #6449 (comment)
Subtasks
TDLR is that ensuring that launched tasks are properly cleaned up (and
panics are propagated back to the main tasks) is tricky.Tokio has a tokio::task::JoinSet which handles the cleanup part and #6507 demonstrates how to use JoinSet to propagate panics.
We should ideally also fix
datafusion/core/src/physical_plan/repartition/mod.rsto propagate panicsand remove
AbortOnDropandAbortOnDropManywith JoinSetOriginally posted by @crepererum in #6449 (comment)
Subtasks
RepartitionExecAbortOnDrop/AbortDropOnManydisallowed_methodslint to prevent the usage oftokio::spawnaltogether, since it led to so many cancellation and error propagation bugs.