Commits


Jinpeng authored and GitHub committed 72ec35e67bc
GH-36178: [C++]support prefetching for ReadRangeCache lazy mode (#36180) ### Rationale for this change The current [ReadRangeCache](https://github.com/apache/arrow/blob/main/cpp/src/arrow/io/caching.h#L100) support a laze mode where each range is read upon an [explicit request](https://github.com/apache/arrow/blob/main/cpp/src/arrow/io/caching.cc#L255), and a non-lazy mode where all ranges are read concurrently [at once](https://github.com/apache/arrow/blob/main/cpp/src/arrow/io/caching.cc#L168). In some scenarios, it would help to support a prefetch mode (which naturally is bound to the lazy mode) such that explicitly reading one range will prefetching one or more following ranges . ### What changes are included in this PR? Add a new cache option `prefetch_limit` to define the maximum number of ranges to be prefetched when reading one range in lazy mode. ### Are these changes tested? Yes. A new unit test is included ### Are there any user-facing changes? No. * Closes: #36178 Authored-by: jp0317 <zjpzlz@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>