lidavidm commented on a change in pull request #9620:
URL: https://github.com/apache/arrow/pull/9620#discussion_r621215364



##########
File path: cpp/src/arrow/io/caching.cc
##########
@@ -188,17 +223,51 @@ Result<std::shared_ptr<Buffer>> 
ReadRangeCache::Read(ReadRange range) {
       [](const RangeCacheEntry& entry, const ReadRange& range) {
         return entry.range.offset + entry.range.length < range.offset + 
range.length;
       });
+  std::unique_lock<std::mutex> guard = impl_->TakeGuard();
   if (it != impl_->entries.end() && it->range.Contains(range)) {
-    ARROW_ASSIGN_OR_RAISE(auto buf, it->future.result());
+    auto fut = impl_->GetFuture(&*it);

Review comment:
       This is turning the iterator type into an actual pointer.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to