Skip to content

Commit

Permalink
Merge pull request #61341 from ClickHouse/cherrypick/24.2/be13d8eb392…
Browse files Browse the repository at this point in the history
…5ec2c4138cd1d3167a3ad3a8d2e43

Cherry pick #60499 to 24.2: Cancel PipelineExecutor properly in case of exception in spawnThreads
  • Loading branch information
robot-ch-test-poll committed Mar 13, 2024
2 parents dec36cf + be13d8e commit c339415
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 c339415

Please sign in to comment.