Skip to content

Commit

Permalink
Backport #60499 to 23.12: Cancel PipelineExecutor properly in case of…
Browse files Browse the repository at this point in the history
… exception in spawnThreads
  • Loading branch information
robot-clickhouse committed Mar 13, 2024
1 parent d276f88 commit 69e8829
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Processors/Executors/PipelineExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ void PipelineExecutor::executeImpl(size_t num_threads, bool concurrency_control)
SCOPE_EXIT_SAFE(
if (!finished_flag)
{
finish();
/// If finished_flag is not set, there was an exception.
/// Cancel execution in this case.
cancel();
if (pool)
pool->wait();
}
Expand Down

0 comments on commit 69e8829

Please sign in to comment.