Tanya-W commented on code in PR #16003:
URL: https://github.com/apache/doris/pull/16003#discussion_r1072175621
##########
be/src/olap/lru_cache.h:
##########
@@ -146,6 +147,7 @@ class CacheKey {
enum class CachePriority { NORMAL = 0, DURABLE = 1 };
using CacheValuePredicate = std::function<bool(const void*)>;
+using CacheValueExtractor = std::function<int64_t(const void*)>;
Review Comment:
in this pr may name with time is more intuitive, but `CacheValueExtractor`
can be used for extracting any members of type int64_t, not only timestamp
##########
be/src/olap/lru_cache.h:
##########
@@ -353,12 +364,20 @@ class LRUCache {
uint64_t _lookup_count = 0; // cache查找总次数
uint64_t _hit_count = 0; // 命中cache的总次数
+
+ CacheValueExtractor _cache_value_extractor;
+ bool _cache_value_check_timestamp = false;
+ LRUHandleHeap _sort_normal_entries_with_timestamp;
Review Comment:
updated
--
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]