Repository navigation
fix(read): validate byte ranges and honor disabled prefetch cache - #522
Merged
Merged
Conversation
zjw1111
approved these changes
Nov 6, 2026
zjw1111
left a comment
Collaborator
There was a problem hiding this comment.
+1 for the fix, but please check and modify the PR description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Fix two existing main-branch bugs identified in the review of #513:
PreBufferRange()error previously failed an otherwise readable scan, including withwarmup=NONE.Manually constructed integration-test splits now obtain the actual fixture length through
GetFileStatus()instead of using placeholder sizes or reusing an ORC file size for Parquet.Tests
Five new regression tests cover out-of-file and overflowing ranges, invalid late registrations preserving existing cache state, exact EOF boundaries, unknown file sizes, and cache-disabled LM reads under NONE/RAW/DECODED warmup. The LM test makes every range query fail and checks the complete filtered result. Before the production fix, the expected three regression tests failed; after the fix, all five pass.
Native Debug validation (
build-rest, ORC/Parquet/Avro/REST enabled):The all-component local build could not finish because of Rust dependency/toolchain incompatibilities (Vortex with Rust 1.67, then Lance/ethnum with installed stable Rust 1.97). The successful native build disables those optional Rust formats. Repository-wide
unittest, other integration executables and local sanitizer builds were not run.API and Format
No changes to installed public API, storage format or protocol. Malformed ranges beyond a known file size now return a validation error before splitting and allocating cache entries. File size zero retains its existing unknown-size behavior.
Documentation
Updated the internal
ReadAheadCacheconstructor andAddRanges()comments to describe validation and the unknown-size convention. No new feature or configuration option.Generative AI tooling
Generated-by: OpenAI Codex (codex-cli 0.166.0)