This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 92d73338102 [Fix](point query) avoid nullptr in _block_pool (#33120) 92d73338102 is described below commit 92d7333810232b995882e252540673227476b6dd Author: lihangyu <15605149...@163.com> AuthorDate: Fri Apr 5 07:59:57 2024 +0800 [Fix](point query) avoid nullptr in _block_pool (#33120) `resize` will make nullptrs in _block_pool if _block_pool.size() < s_preallocted_blocks_num --- be/src/service/point_query_executor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/be/src/service/point_query_executor.cpp b/be/src/service/point_query_executor.cpp index b39edb6d69c..7cbc8a5a638 100644 --- a/be/src/service/point_query_executor.cpp +++ b/be/src/service/point_query_executor.cpp @@ -97,12 +97,14 @@ std::unique_ptr<vectorized::Block> Reusable::get_block() { void Reusable::return_block(std::unique_ptr<vectorized::Block>& block) { std::lock_guard lock(_block_mutex); - if (_block_pool.size() > s_preallocted_blocks_num) { + if (block == nullptr) { return; } block->clear_column_data(); _block_pool.push_back(std::move(block)); - _block_pool.resize(s_preallocted_blocks_num); + if (_block_pool.size() > s_preallocted_blocks_num) { + _block_pool.resize(s_preallocted_blocks_num); + } } int64_t Reusable::mem_size() const { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org