Skip to content

Commit

Permalink
fix a panic issue in parallel agg when exception is thrown (#5433) (#…
Browse files Browse the repository at this point in the history
…5437)

close #5356
  • Loading branch information
ti-chi-bot authored Jul 21, 2022
1 parent a3656a5 commit 76d5e3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,9 @@ void ParallelAggregatingBlockInputStream::Handler::onFinish()
void ParallelAggregatingBlockInputStream::Handler::onException(std::exception_ptr & exception, size_t thread_num)
{
parent.exceptions[thread_num] = exception;
/// can not cancel parent inputStream or the exception might be lost
if (!parent.executed)
/// kill the processor so ExchangeReceiver will be closed
parent.processor.cancel(true);
parent.cancel(true);
}


Expand Down

0 comments on commit 76d5e3f

Please sign in to comment.