wangbo commented on code in PR #42006: URL: https://github.com/apache/doris/pull/42006#discussion_r1824241525
########## be/src/runtime/workload_group/workload_group_manager.cpp: ########## @@ -34,6 +34,32 @@ namespace doris { +void WorkloadGroupMgr::init_internal_workload_group() { + WorkloadGroupPtr internal_wg = nullptr; + { + std::lock_guard<std::shared_mutex> w_lock(_group_mutex); + if (_workload_groups.find(INTERNAL_WORKLOAD_GROUP_ID) == _workload_groups.end()) { + WorkloadGroupInfo internal_wg_info { + .id = INTERNAL_WORKLOAD_GROUP_ID, + .name = INTERNAL_WORKLOAD_GROUP_NAME, + .cpu_share = CgroupCpuCtl::cpu_soft_limit_default_value()}; + internal_wg = std::make_shared<WorkloadGroup>(internal_wg_info); + _workload_groups[internal_wg_info.id] = internal_wg; + LOG(INFO) << "create internal group succ, wg_id=" << internal_wg_info.id; + } + } + DCHECK(internal_wg != nullptr); + if (internal_wg) { + internal_wg->create_cgroup_cpu_ctl(); + internal_wg->set_need_create_query_thread_pool(false); Review Comment: 因为create cgroup cpu ctl的时候,会有写系统文件的操作,这东西放构造器里不好吧 -- 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