xinyiZzz commented on code in PR #28794: URL: https://github.com/apache/doris/pull/28794#discussion_r1500378381
########## be/src/olap/lru_cache.cpp: ########## @@ -231,18 +231,29 @@ void LRUCache::_lru_append(LRUHandle* list, LRUHandle* e) { } Cache::Handle* LRUCache::lookup(const CacheKey& key, uint32_t hash) { - std::lock_guard l(_mutex); - ++_lookup_count; - LRUHandle* e = _table.lookup(key, hash); - if (e != nullptr) { - // we get it from _table, so in_cache must be true - DCHECK(e->in_cache); - if (e->refs == 1) { - // only in LRU free list, remove it from list - _lru_remove(e); + LRUHandle* e; Review Comment: done ########## be/src/olap/lru_cache.cpp: ########## @@ -347,16 +358,48 @@ bool LRUCache::_check_element_count_limit() { return _element_count_capacity != 0 && _table.element_count() >= _element_count_capacity; } +bool LRUCache::_lru_k_disable_insert(size_t total_size, visits_lru_cache_key visits_key) { Review Comment: done -- 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