github-actions[bot] commented on code in PR #28940: URL: https://github.com/apache/doris/pull/28940#discussion_r1436360971
########## be/src/olap/lru_cache.h: ########## @@ -456,4 +466,23 @@ class ShardedLRUCache : public Cache { std::unique_ptr<bvar::PerSecond<bvar::Adder<uint64_t>>> _lookup_count_per_second; }; +class EmptyLRUCache : public Cache { +public: + Handle* insert(const CacheKey& key, void* value, size_t charge, + void (*deleter)(const CacheKey& key, void* value), + CachePriority priority = CachePriority::NORMAL, + size_t bytes = -1) override; + Handle* lookup(const CacheKey& key) override { return nullptr; }; + void release(Handle* handle) override {}; + void erase(const CacheKey& key) override {}; + void* value(Handle* handle) override { return nullptr; }; + Slice value_slice(Handle* handle) override { return {}; }; + uint64_t new_id() override { return 0; }; + int64_t prune() override { return 0; }; + int64_t prune_if(CacheValuePredicate pred, bool lazy_mode = false) override { return 0; }; Review Comment: warning: method 'prune_if' can be made static [readability-convert-member-functions-to-static] ```suggestion erride { return 0; };static ``` ########## be/src/runtime/memory/lru_cache_policy.h: ########## @@ -91,10 +131,16 @@ class LRUCachePolicy : public CachePolicy { } } - Cache* get() { return _cache.get(); } + Cache* get() { Review Comment: warning: method 'get' can be made const [readability-make-member-function-const] ```suggestion Cache* get() const { ``` -- 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