From 6ee53d2790d3c4f167e2a12b7c7faf6dc39cb719 Mon Sep 17 00:00:00 2001 From: huanghaibin <284824253@qq.com> Date: Wed, 27 Dec 2023 22:25:44 +0800 Subject: [PATCH] [fix](compaction) compaction should catch exception when vertical block reader read next block (#28625) (#29125) --- be/src/vec/olap/vertical_block_reader.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/be/src/vec/olap/vertical_block_reader.cpp b/be/src/vec/olap/vertical_block_reader.cpp index 0b2cb065b08dc7..8c95b0d92602aa 100644 --- a/be/src/vec/olap/vertical_block_reader.cpp +++ b/be/src/vec/olap/vertical_block_reader.cpp @@ -524,10 +524,12 @@ Status VerticalBlockReader::_unique_key_next_block(Block* block, bool* eof) { } const auto& src_block = _next_row.block; assert(src_block->columns() == column_count); - for (size_t i = 0; i < column_count; ++i) { - target_columns[i]->insert_from(*(src_block->get_by_position(i).column), - _next_row.row_pos); - } + RETURN_IF_CATCH_EXCEPTION({ + for (size_t i = 0; i < column_count; ++i) { + target_columns[i]->insert_from(*(src_block->get_by_position(i).column), + _next_row.row_pos); + } + }); ++target_block_row; } while (target_block_row < _reader_context.batch_size); return Status::OK();