Gabriel39 opened a new pull request, #66548: URL: https://github.com/apache/doris/pull/66548
### What problem does this PR solve? Hot-cache external Parquet scans can read a page header and its payload from the same file-cache block. The reader-local block cache introduced by #66504 currently waits for three accesses before promoting the block, so the common two-read sequence still performs two local file reads. This contributes to long local-cache scan time in large TPC-DS queries even when scanner concurrency and total bytes are comparable. StarRocks buffers its smaller 256 KiB data-cache block on the first access. Doris uses a larger 1 MiB file-cache block, so eagerly applying the same policy would amplify header-only reads when predicate pruning skips the payload. ### What is changed? - Promote an external file-cache block to the bounded reader-local cache on its second access. - Keep the first partial read exact, avoiding a full-block read for header-only page skips. - Extend the cache regression test to verify the header/payload sequence promotes on the second read and remains readable after the backing cache file is removed. This PR is based on and depends on #66504. ### Validation - ASAN BE UT: `BlockFileCacheTest.external_reader_promotes_cache_block_on_second_partial_read` - ASAN BE UT: four related `BufferedReaderTest` cases covering exact-cache bypass, cache-miss range merging, and predicate-stage range exposure - clang-format 16 check on all affected C++ files -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
