wuyunfeng commented on a change in pull request #4172: URL: https://github.com/apache/incubator-doris/pull/4172#discussion_r471326590
########## File path: be/src/util/blocking_priority_queue.hpp ########## @@ -85,34 +85,32 @@ class BlockingPriorityQueue { MonotonicStopWatch timer; boost::unique_lock<boost::mutex> unique_lock(_lock); - while (true) { - if (!_queue.empty()) { - // 定期提高队列中残留的任务优先级 - // 保证优先级较低的大查询不至于完全饿死 - if (_upgrade_counter > config::priority_queue_remaining_tasks_increased_frequency) { - std::priority_queue<T> tmp_queue; - while (!_queue.empty()) { - T v = _queue.top(); - _queue.pop(); - ++v; - tmp_queue.push(v); - } - swap(_queue, tmp_queue); - _upgrade_counter = 0; + if (!_queue.empty()) { + // 定期提高队列中残留的任务优先级 Review comment: Maybe you should write the comment using the English ---------------------------------------------------------------- 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. 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