yiguolei commented on code in PR #27798: URL: https://github.com/apache/doris/pull/27798#discussion_r1413410991
########## be/src/agent/cgroup_cpu_ctl.cpp: ########## @@ -157,4 +181,45 @@ Status CgroupV1CpuCtl::add_thread_to_cgroup() { return CgroupCpuCtl::write_cg_sys_file(_cgroup_v1_cpu_tg_task_file, tid, msg, true); #endif } + +Status CgroupV1CpuCtl::delete_unused_cgroup_path(std::set<uint64_t>& used_wg_ids) { + if (!_init_succ) { + return Status::InternalError<false>( + "cgroup cpu ctl init failed, delete can not be executed"); + } + // 1 get all wg id + std::set<std::string> unused_wg_ids; + DIR* query_path_dir = opendir(_cgroup_v1_cpu_query_path.c_str()); + struct dirent* de; Review Comment: why not use c++ api? the C api is not platform independent. -- 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