BiteTheDDDDt commented on code in PR #19331: URL: https://github.com/apache/doris/pull/19331#discussion_r1186637931
########## be/src/vec/runtime/vdata_stream_recvr.cpp: ########## @@ -161,9 +162,11 @@ void VDataStreamRecvr::SenderQueue::add_block(const PBlock& pblock, int be_numbe COUNTER_UPDATE(_recvr->_deserialize_row_batch_timer, deserialize_time); COUNTER_UPDATE(_recvr->_decompress_timer, block->get_decompress_time()); COUNTER_UPDATE(_recvr->_decompress_bytes, block->get_decompressed_bytes()); - - _block_queue.emplace_back(std::move(block), block_byte_size); - _update_block_queue_empty(); + { + std::lock_guard<std::mutex> l(_lock); + _block_queue.emplace_back(std::move(block), block_byte_size); + _update_block_queue_empty_in_lock(); Review Comment: Maybe we can wrap this piece of code into a function ``` lock push block to queue update emtpy flag ``` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org