xiaokang commented on code in PR #33120:
URL: https://github.com/apache/doris/pull/33120#discussion_r1547073366
##########
be/src/service/point_query_executor.cpp:
##########
@@ -100,12 +100,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);
Review Comment:
Why put block to pool and then shrink pool instead of not put block as
before?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]