yiguolei commented on code in PR #32080:
URL: https://github.com/apache/doris/pull/32080#discussion_r1520832896
##########
be/src/runtime/memory/lru_cache_policy.h:
##########
@@ -72,7 +81,48 @@ class LRUCachePolicy : public CachePolicy {
return true;
}
- ~LRUCachePolicy() override = default;
+ static std::string lru_cache_type_string(LRUCacheType type) {
+ switch (type) {
+ case LRUCacheType::SIZE:
+ return "size";
+ case LRUCacheType::NUMBER:
+ return "number";
+ default:
+ LOG(FATAL) << "not match type of lru cache:" <<
static_cast<int>(type);
+ }
+ }
+
+ std::shared_ptr<MemTrackerLimiter> mem_tracker() { return _mem_tracker; }
+
+ Cache::Handle* insert(const CacheKey& key, void* value, size_t charge,
+ CachePriority priority = CachePriority::NORMAL,
size_t bytes = -1) {
+ return _insert(true, key, value, charge, priority, bytes);
+ }
+
+ Cache::Handle* insert_no_tracking(const CacheKey& key, void* value, size_t
charge,
Review Comment:
删了吧,直接size = 0 就是no tracking了
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]