Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion be/src/olap/lru_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,13 @@ void LRUCache::erase(const CacheKey& key, uint32_t hash, MemTracker* tracker) {
}
// free handle out of mutex, when last_ref is true, e must not be nullptr
if (last_ref) {
size_t charge = e->charge;
e->free();
// The parameter tracker is ShardedLRUCache::_mem_tracker,
// because the memory released by LRUHandle is recorded in the tls mem tracker,
// so this part of the memory is subsidized from ShardedLRUCache::_mem_tracker to the tls mem tracker
tracker->transfer_to(thread_local_ctx.get()->_thread_mem_tracker_mgr->mem_tracker().get(),
e->charge);
charge);
}
}

Expand Down