[fix](mem tracker) Fix some memory leaks, inaccurate statistics, core dump, deadlock bugs (#10072)
1. Fix the memory leak. When the load task is canceled, the `IndexChannel` and `NodeChannel` mem trackers cannot be destructed in time. 2. Fix Load task being frequently canceled by oom and inaccurate `LoadChannel` mem tracker limit, and rewrite the variable name of `mem limit` in `LoadChannel`. 3. Fix core dump, when logout task mem tracker, phmap erase fails, resulting in repeated logout of the same tracker. 4. Fix the deadlock, when add_child_tracker mem limit exceeds, calling log_usage causes `_child_trackers_lock` deadlock. 5. Fix frequent log printing when thread mem tracker limit exceeds, which will affect readability and performance. 6. Optimize some details of mem tracker display.
This commit is contained in:
@ -58,7 +58,7 @@ EngineCloneTask::EngineCloneTask(const TCloneReq& clone_req, const TMasterInfo&
|
||||
_signature(signature),
|
||||
_master_info(master_info) {
|
||||
_mem_tracker = MemTracker::create_tracker(
|
||||
-1, "EngineCloneTask:tabletId=" + std::to_string(_clone_req.tablet_id),
|
||||
-1, "EngineCloneTask#tabletId=" + std::to_string(_clone_req.tablet_id),
|
||||
StorageEngine::instance()->clone_mem_tracker(), MemTrackerLevel::TASK);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user