wgtmac commented on code in PR #2409: URL: https://github.com/apache/orc/pull/2409#discussion_r2365982180
########## c++/src/Reader.cc: ########## @@ -1173,21 +1189,33 @@ namespace orc { if (enableAsyncPrefetch_) { contents_->evictCache(currentStripeInfo_.offset()); - if (fullyCachedStripes_.find(currentStripe_) != fullyCachedStripes_.cend()) { - // Current stripe has been fully cached, do nothing. - } else if (isSmallStripe(currentStripeInfo_, contents_->cacheOptions.rangeSizeLimit)) { + auto extractSmallStripeRanges = [this](uint64_t startStripe) { std::vector<ReadRange> ranges; - uint64_t maxStripe = - std::min(lastStripe_, currentStripe_ + smallStripeLookAheadLimit_ + 1); - for (uint64_t stripe = currentStripe_; stripe < maxStripe; stripe++) { + uint64_t maxStripe = std::min(lastStripe_, startStripe + smallStripeLookAheadLimit_ + 1); Review Comment: If we don't add one, then the loop will do nothing if `smallStripeLookAheadLimit_` is 0. -- 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: issues-unsubscr...@orc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org