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


##########
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:
   这里不要做无谓的操作,可能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