cshuo opened a new pull request, #19984: URL: https://github.com/apache/hudi/pull/19984
### Describe the issue this Pull Request addresses Closes #19983. `HoodieLsmFileGroupReader` can read native data/delete logs newer than `latestCommitTime`, causing time-travel reads to apply future updates or deletions. Selecting a file slice by its base instant does not exclude later logs within that slice. For example, a delete at `004` must not remove a record when reading as of `002`. ### Summary and Changelog - Filter native logs by `deltaCommitTime <= latestCommitTime` before constructing the input split, then apply the existing optional `InstantRange`. - Add regression coverage for older logs, data/delete logs at the inclusive boundary, excluded future logs, and an explicit instant range extending past the boundary. - Verify that filtering out all logs preserves the base-file-only path and duplicate base records. ### Impact LSM reads exclude updates and deletes after the query instant. Excluded log files are not opened. No public API, storage format, or configuration changes. ### Risk Level Low. The change applies the existing classic scanner's upper-bound semantics at native-log file level. Regression tests reproduce the failure before the fix. All 24 tests across `TestHoodieLsmFileGroupReader`, `TestLsmFileGroupRecordIterator`, `TestLsmFileIterators`, `TestSpillableLsmRecordIterator`, and `TestLsmReaderUtils` pass after the fix. Maven Checkstyle and `git diff --check` also pass. ### Documentation Update None. ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
