xinyiZzz commented on code in PR #28940:
URL: https://github.com/apache/doris/pull/28940#discussion_r1437499668


##########
be/src/olap/lru_cache.cpp:
##########
@@ -667,4 +669,43 @@ void ShardedLRUCache::update_cache_metrics() const {
             total_lookup_count == 0 ? 0 : ((double)total_hit_count / 
total_lookup_count));
 }
 
+Cache::Handle* DummyLRUCache::insert(const CacheKey& key, void* value, size_t 
charge,
+                                     void (*deleter)(const CacheKey& key, 
void* value),
+                                     CachePriority priority, size_t bytes) {
+    size_t handle_size = sizeof(LRUHandle) - 1 + key.size();
+    auto* e = reinterpret_cast<LRUHandle*>(malloc(handle_size));
+    g_doris_cache_dummy_usage_num << 1;

Review Comment:
   这里是为了排查是否存在 handle 忘记 release 的情况,这会导致泄漏
   
   cache insert 和 release 不会太频繁吧,一些更频繁的地方也用的bvar



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to