HappenLee commented on code in PR #20511: URL: https://github.com/apache/doris/pull/20511#discussion_r1222415261
########## be/src/pipeline/exec/exchange_sink_buffer.cpp: ########## @@ -305,25 +306,29 @@ bool ExchangeSinkBuffer::_is_receiver_eof(InstanceLoId id) { void ExchangeSinkBuffer::get_max_min_rpc_time(int64_t* max_time, int64_t* min_time) { int64_t local_max_time = 0; - int64_t local_min_time = 0; - auto iter = _instance_to_rpc_time.begin(); - if (iter != _instance_to_rpc_time.end()) { - local_max_time = iter->second; - local_min_time = iter->second; - iter++; - } - while (iter != _instance_to_rpc_time.end()) { - int64_t cur_val = iter->second; - local_max_time = cur_val > local_max_time ? cur_val : local_max_time; - local_min_time = cur_val < local_min_time ? cur_val : local_min_time; - iter++; + int64_t local_min_time = INT64_MAX; + for (auto& [id, time] : _instance_to_rpc_time) { + if (time == 0) { Review Comment: if (time != 0) { local_max_time = std::max(local_max_time, time); local_min_time = std::min(local_min_time, time); } -- 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