[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:
@ -27,7 +27,7 @@ EngineChecksumTask::EngineChecksumTask(TTabletId tablet_id, TSchemaHash schema_h
|
||||
TVersion version, uint32_t* checksum)
|
||||
: _tablet_id(tablet_id), _schema_hash(schema_hash), _version(version), _checksum(checksum) {
|
||||
_mem_tracker = MemTracker::create_tracker(
|
||||
-1, "EngineChecksumTask:tabletId=" + std::to_string(tablet_id),
|
||||
-1, "EngineChecksumTask#tabletId=" + std::to_string(tablet_id),
|
||||
StorageEngine::instance()->consistency_mem_tracker(), MemTrackerLevel::TASK);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user