[fix](memory tracker) Fix lru cache, compaction tracker, add USE_MEM_TRACKER compile (#9661)

1. Fix Lru Cache MemTracker consumption value is negative.
2. Fix compaction Cache MemTracker has no track.
3. Add USE_MEM_TRACKER compile option.
4. Make sure the malloc/free hook is not stopped at any time.
This commit is contained in:
Xinyi Zou
2022-05-25 08:56:17 +08:00
committed by GitHub
parent cc9321a09b
commit ca05d1ee01
23 changed files with 183 additions and 60 deletions

View File

@ -1609,6 +1609,8 @@ void TaskWorkerPool::_random_sleep(int second) {
}
void TaskWorkerPool::_submit_table_compaction_worker_thread_callback() {
SCOPED_ATTACH_TASK_THREAD(ThreadContext::TaskType::COMPACTION,
StorageEngine::instance()->compaction_mem_tracker());
while (_is_work) {
TAgentTaskRequest agent_task_req;
TCompactionReq compaction_req;