fix cgroup issues
This commit is contained in:
parent
81b3514d20
commit
bbc7c2c804
5
deps/oblib/src/lib/ob_define.h
vendored
5
deps/oblib/src/lib/ob_define.h
vendored
@ -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)
|
||||
{
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user