github-actions[bot] commented on code in PR #26710:
URL: https://github.com/apache/doris/pull/26710#discussion_r1397016215


##########
be/src/runtime/task_group/task_group_manager.cpp:
##########
@@ -59,10 +59,38 @@ void TaskGroupManager::get_resource_groups(const 
std::function<bool(const TaskGr
     }
 }
 
-Status TaskGroupManager::create_and_get_task_scheduler(uint64_t tg_id, 
std::string tg_name,
-                                                       int cpu_hard_limit, int 
cpu_shares,
-                                                       ExecEnv* exec_env,
-                                                       QueryContext* 
query_ctx_ptr) {
+TaskGroupPtr TaskGroupManager::get_task_group_by_id(uint64_t tg_id) {
+    std::shared_lock<std::shared_mutex> r_lock(_group_mutex);
+    if (_task_groups.find(tg_id) != _task_groups.end()) {
+        return _task_groups.at(tg_id);
+    }
+    return nullptr;
+}
+
+bool TaskGroupManager::set_task_sche_for_query_ctx(uint64_t tg_id, 
QueryContext* query_ctx_ptr) {

Review Comment:
   warning: method 'set_task_sche_for_query_ctx' can be made static 
[readability-convert-member-functions-to-static]
   
   be/src/runtime/task_group/task_group_manager.h:67:
   ```diff
   -     bool set_task_sche_for_query_ctx(uint64_t tg_id, QueryContext* 
query_ctx_ptr);
   +     static bool set_task_sche_for_query_ctx(uint64_t tg_id, QueryContext* 
query_ctx_ptr);
   ```
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to