From 0a4aef3c98ee91b78c2d30ee32e33732c30b5a52 Mon Sep 17 00:00:00 2001 From: Liqi Geng Date: Thu, 21 Jul 2022 14:17:09 +0800 Subject: [PATCH 1/2] This is an automated cherry-pick of #5433 Signed-off-by: ti-chi-bot --- .../src/DataStreams/ParallelAggregatingBlockInputStream.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp index 3163975108f..84d60f59dce 100644 --- a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp +++ b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp @@ -202,10 +202,14 @@ void ParallelAggregatingBlockInputStream::Handler::onException(std::exception_pt Int32 old_value = -1; parent.first_exception_index.compare_exchange_strong(old_value, static_cast(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) +<<<<<<< HEAD /// kill the processor so ExchangeReceiver will be closed parent.processor.cancel(true); +======= + /// use cancel instead of kill to avoid too many useless error message + parent.cancel(false); +>>>>>>> 7b280755ba (fix a panic issue in parallel agg when exception is thrown (#5433)) } From da5d229b7c3db5826cbf39b60a76b97e9f534d50 Mon Sep 17 00:00:00 2001 From: gengliqi Date: Thu, 21 Jul 2022 16:50:41 +0800 Subject: [PATCH 2/2] fix conflict Signed-off-by: gengliqi --- .../DataStreams/ParallelAggregatingBlockInputStream.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp index 84d60f59dce..493ed8b3839 100644 --- a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp +++ b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp @@ -203,13 +203,8 @@ void ParallelAggregatingBlockInputStream::Handler::onException(std::exception_pt parent.first_exception_index.compare_exchange_strong(old_value, static_cast(thread_num), std::memory_order_seq_cst, std::memory_order_relaxed); if (!parent.executed) -<<<<<<< HEAD /// kill the processor so ExchangeReceiver will be closed - parent.processor.cancel(true); -======= - /// use cancel instead of kill to avoid too many useless error message - parent.cancel(false); ->>>>>>> 7b280755ba (fix a panic issue in parallel agg when exception is thrown (#5433)) + parent.cancel(true); }