Tanya-W commented on code in PR #16003:
URL: https://github.com/apache/doris/pull/16003#discussion_r1072211134


##########
be/src/olap/lru_cache.cpp:
##########
@@ -240,6 +240,16 @@ void LRUCache::release(Cache::Handle* handle) {
                 } else if (e->priority == CachePriority::DURABLE) {
                     _lru_append(&_lru_durable, e);
                 }
+
+                if (_cache_value_check_timestamp) {

Review Comment:
   updated



##########
be/src/olap/lru_cache.cpp:
##########
@@ -250,6 +260,40 @@ void LRUCache::release(Cache::Handle* handle) {
     }
 }
 
+void LRUCache::_evict_from_lru_with_time(size_t total_size, LRUHandle** 
to_remove_head) {
+    // 1. evict normal cache entries
+    while (_usage + total_size > _capacity && 
!_sort_normal_entries_with_timestamp.empty()) {
+        auto entry_pair = _sort_normal_entries_with_timestamp.top();
+        LRUHandle* remove_handle = entry_pair.second;
+        if (_cache_value_extractor(remove_handle->value) != entry_pair.first) {

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: 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