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



##########
File path: cpp/src/arrow/io/caching.cc
##########
@@ -171,7 +171,8 @@ Status ReadRangeCache::Cache(std::vector<ReadRange> ranges) 
{
   }
 
   impl_->AddEntries(std::move(entries));
-  return Status::OK();
+  // Prefetch immediately, regardless of executor availability, if possible
+  return impl_->file->WillNeed(ranges);

Review comment:
       Hey, sorry for the delay. I think what Francois proposes with the file 
readers calling only `WillNeed` makes sense. That way consumers can mostly 
remain the same. However for (parallel) caching to work under this API, this 
means some file implementations will become stateful, which may be 
confusing/error-prone, so I think there's some more consideration warranted for 
the Parquet path.




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