xiaokang commented on code in PR #18033:
URL: https://github.com/apache/doris/pull/18033#discussion_r1144825856


##########
be/src/olap/lru_cache.h:
##########
@@ -314,13 +314,10 @@ class HandleTable {
     void _resize();
 };
 
-// pair first is timestatmp, put <timestatmp, LRUHandle*> into asc 
priority_queue,
-// when need to free space, can first evict the top of the LRUHandleHeap,
-// because the top element's timestamp is the oldest.
-typedef std::priority_queue<std::pair<int64_t, LRUHandle*>,
-                            std::vector<std::pair<int64_t, LRUHandle*>>,
-                            std::greater<std::pair<int64_t, LRUHandle*>>>
-        LRUHandleHeap;
+// pair first is timestatmp, put <timestatmp, LRUHandle*> into asc set,
+// when need to free space, can first evict the begin of the set,
+// because the begin element's timestamp is the oldest.
+typedef std::set<std::pair<int64_t, LRUHandle*>> LRUHandleAscSet;

Review Comment:
   using LRUHandleSortedSet = std::set<std::pair<int64_t, LRUHandle*>>;



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