[CP] Give PX thread more better name
This commit is contained in:
@ -215,10 +215,17 @@ void ObPxPool::handle(ObLink *task)
|
|||||||
ATOMIC_DEC(&concurrency_);
|
ATOMIC_DEC(&concurrency_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObPxPool::set_px_thread_name()
|
||||||
|
{
|
||||||
|
char buf[32];
|
||||||
|
snprintf(buf, 32, "PX_G%ld_%ld", group_id_, tenant_id_);
|
||||||
|
lib::set_thread_name_inner(buf);
|
||||||
|
}
|
||||||
|
|
||||||
void ObPxPool::run1()
|
void ObPxPool::run1()
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
lib::set_thread_name("PxPoolTh", get_thread_idx());
|
set_px_thread_name();
|
||||||
auto *pm = common::ObPageManager::thread_local_instance();
|
auto *pm = common::ObPageManager::thread_local_instance();
|
||||||
if (OB_LIKELY(nullptr != pm)) {
|
if (OB_LIKELY(nullptr != pm)) {
|
||||||
pm->set_tenant_ctx(tenant_id_, common::ObCtxIds::WORK_AREA);
|
pm->set_tenant_ctx(tenant_id_, common::ObCtxIds::WORK_AREA);
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
void set_cgroup_ctrl(share::ObCgroupCtrl *cgroup_ctrl) { cgroup_ctrl_ = cgroup_ctrl; }
|
void set_cgroup_ctrl(share::ObCgroupCtrl *cgroup_ctrl) { cgroup_ctrl_ = cgroup_ctrl; }
|
||||||
int64_t get_pool_size() const { return get_thread_count(); }
|
int64_t get_pool_size() const { return get_thread_count(); }
|
||||||
int submit(const RunFuncT &func);
|
int submit(const RunFuncT &func);
|
||||||
|
void set_px_thread_name();
|
||||||
private:
|
private:
|
||||||
void handle(common::ObLink *task);
|
void handle(common::ObLink *task);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user