Skip to content

Commit

Permalink
Merge pull request #61338 from ClickHouse/backport/23.12/60499
Browse files Browse the repository at this point in the history
Backport #60499 to 23.12: Cancel PipelineExecutor properly in case of exception in spawnThreads
  • Loading branch information
Avogar committed Mar 14, 2024
2 parents d276f88 + 69e8829 commit 635e48b
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 635e48b

Please sign in to comment.