From 407924114545e22816b9b56e723a5e1ef8242c83 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Fri, 22 Jul 2022 09:51:08 +0800 Subject: [PATCH] fix a panic issue in parallel agg when exception is thrown (#5433) (#5442) close pingcap/tiflash#5356 --- dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp index 4d2a8166ea7..796029b09c5 100644 --- a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp +++ b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp @@ -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); }