fix cgroup issues

This commit is contained in:
zhjc1124 2023-11-13 12:12:53 +00:00 committed by ob-robot
parent 81b3514d20
commit bbc7c2c804
2 changed files with 8 additions and 0 deletions

View File

@ -1522,6 +1522,11 @@ OB_INLINE bool is_sys_tenant(const uint64_t tenant_id)
return OB_SYS_TENANT_ID == tenant_id;
}
OB_INLINE bool is_server_tenant(const uint64_t tenant_id)
{
return OB_SERVER_TENANT_ID == tenant_id;
}
//check whether an tenant_id is virtual
OB_INLINE bool is_virtual_tenant_id(const uint64_t tenant_id)
{

View File

@ -283,6 +283,9 @@ int ObCgroupCtrl::get_group_path(
if (INT64_MAX == group_id) {
snprintf(group_path, path_bufsize, "%s/%s",
root_cgroup_, tenant_path);
} else if (is_server_tenant(tenant_id)) {
snprintf(group_path, path_bufsize, "%s",
other_cgroup_);
} else if (group_id < OBCG_MAXNUM) {
ObCgSet &set = ObCgSet::instance();
group_name = const_cast<char*>(set.name_of_id(group_id));