adonis0147 commented on code in PR #29696: URL: https://github.com/apache/doris/pull/29696#discussion_r1445578359
########## be/src/runtime/task_group/task_group_manager.cpp: ########## @@ -69,18 +69,16 @@ TaskGroupPtr TaskGroupManager::get_task_group_by_id(uint64_t tg_id) { bool TaskGroupManager::set_cg_task_sche_for_query_ctx(uint64_t tg_id, QueryContext* query_ctx_ptr) { std::lock_guard<std::shared_mutex> write_lock(_task_scheduler_lock); - if (_tg_sche_map.find(tg_id) != _tg_sche_map.end()) { - query_ctx_ptr->set_task_scheduler(_tg_sche_map.at(tg_id).get()); - } else { - return false; - } Review Comment: The original one can support failing fast and it can be more efficient than the modifications under some scenarios. -- 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