Skip to content

Commit

Permalink
fix a panic issue in parallel agg when exception is thrown (pingcap#5433
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jul 22, 2022
1 parent 648f06a commit 4079241
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 @@ -160,9 +160,8 @@ 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)
parent.processor.cancel(false);
parent.cancel(false);
}


Expand Down

0 comments on commit 4079241

Please sign in to comment.