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
…5443)

close #5356
  • Loading branch information
ti-chi-bot authored Jul 21, 2022
1 parent a859794 commit 2b4fa17
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 @@ -185,10 +185,9 @@ void ParallelAggregatingBlockInputStream::Handler::onException(std::exception_pt
Int32 old_value = -1;
parent.first_exception_index.compare_exchange_strong(old_value, static_cast<Int32>(thread_num), std::memory_order_seq_cst, std::memory_order_relaxed);

/// 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 2b4fa17

Please sign in to comment.