yiguolei commented on code in PR #38657: URL: https://github.com/apache/doris/pull/38657#discussion_r1699342973
########## be/src/pipeline/local_exchange/local_exchanger.cpp: ########## @@ -203,9 +224,7 @@ Status PassthroughExchanger::sink(RuntimeState* state, vectorized::Block* in_blo auto channel_id = (local_state._channel_id++) % _num_partitions; size_t memory_usage = new_block.allocated_bytes(); local_state._shared_state->add_mem_usage(channel_id, memory_usage); - if (_data_queue[channel_id].enqueue(std::move(new_block))) { - local_state._shared_state->set_ready_to_read(channel_id); - } else { + if (!_enqueue_data_and_set_ready(channel_id, local_state, std::move(new_block))) { Review Comment: 如果这里都加lock了,为啥不直接把 add mem usage 和sub memusage 都放到lock 里完成? 也不用判断没加成功再减掉这种逻辑了。 -- 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