set group id for ObThworker::run()
This commit is contained in:
parent
f268b671ca
commit
216e42b4a0
@ -430,6 +430,7 @@ void ObThWorker::run(int64_t idx)
|
||||
int64_t tenant_id = -1;
|
||||
int64_t req_recv_timestamp = -1;
|
||||
int32_t worker_level = -1;
|
||||
SET_GROUP_ID(get_group_id());
|
||||
this->worker(tenant_id, req_recv_timestamp, worker_level);
|
||||
}
|
||||
|
||||
|
@ -313,8 +313,9 @@ int ObTenantBase::pre_run()
|
||||
ObTenantEnv::set_tenant(this);
|
||||
// register in tenant cgroup without modifying group_id
|
||||
ObCgroupCtrl *cgroup_ctrl = get_cgroup();
|
||||
if (OB_NOT_NULL(cgroup_ctrl)) {
|
||||
ret = cgroup_ctrl->add_self_to_cgroup_(id_, GET_GROUP_ID());
|
||||
if (OB_NOT_NULL(cgroup_ctrl) && cgroup_ctrl->is_valid()) {
|
||||
// add thread to tenant OBCG_DEFAULT cgroup
|
||||
ret = cgroup_ctrl->add_self_to_cgroup_(id_);
|
||||
}
|
||||
{
|
||||
ThreadListNode *node = lib::Thread::current().get_thread_list_node();
|
||||
|
Loading…
x
Reference in New Issue
Block a user