justinli500 commented on code in PR #49855:
URL: https://github.com/apache/arrow/pull/49855#discussion_r4520938781


##########
cpp/src/arrow/io/caching.cc:
##########
@@ -151,12 +154,12 @@ struct ReadRangeCache::Impl {
   IOContext ctx;
   CacheOptions options;
 
-  // Ordered by offset (so as to find a matching region by binary search)
-  std::vector<RangeCacheEntry> entries;
+  std::deque<RangeCacheEntry> entries;  // GUARDED_BY(entry_mutex)

Review Comment:
   Good point. I switched back to `vector` and used an index to track the live 
entries. Now eviction clears expired futures, and `Cache()` merges the 
remaining entries with new ranges.



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

Reply via email to