HIVE-30044: LLAP delete delta tail is read from the filesystem even on a cache hit - #6778
Open
deniskuzZ wants to merge 1 commit into
Open
HIVE-30044: LLAP delete delta tail is read from the filesystem even on a cache hit#6778deniskuzZ wants to merge 1 commit into
deniskuzZ wants to merge 1 commit into
Conversation
…n a cache hit getOrcReaderData asks the LLAP metadata cache for the delete delta's OrcTail and builds a reader from it, then falls through and re-reads both from the filesystem, discarding what the cache returned. HIVE-23553 dropped the early return when it adapted the method to ORC 1.6.7, so since then hive.llap.io.cache.deletedeltas=metadata has had no effect and the 'all' level re-reads every delete delta footer once per split. Restore the early return, and cover it: the test serves a known OrcTail from a mocked LLAP IO and asserts the reader is handed that instance. Without the return it gets a freshly read one.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Close the returned ReaderData in the test to prevent resource leaks.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Restores LLAP cached delete-delta tail reuse and adds regression coverage.
Changes:
- Restores the cache-hit early return.
- Adds a cached-tail reuse test.
File summaries
| File | Summary |
|---|---|
ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedOrcAcidRowBatchReaderTailCache.java |
Adds cache-hit coverage; ReaderData should be closed with try-with-resources. |
ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java |
Reuses cached metadata without rereading the filesystem. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+88
to
+91
| ReaderData readerData = VectorizedOrcAcidRowBatchReader.getOrcReaderData(path, conf, null, null); | ||
|
|
||
| assertSame("the cached tail must not be replaced by a filesystem read", cachedTail, readerData.orcTail); | ||
| assertNotNull(readerData.reader); |
|
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.



What changes were proposed in this pull request?
getOrcReaderData asks the LLAP metadata cache for the delete delta's OrcTail and builds a reader from it, then falls through and re-reads both from the filesystem, discarding what the cache returned.
HIVE-23553 dropped the early return when it adapted the method to ORC 1.6.7, so since then hive.llap.io.cache.deletedeltas=metadata has had no effect and the 'all' level re-reads every delete delta footer once per split.
Restore the early return
Why are the changes needed?
LLAP delete delta tail is read from the filesystem even on a cache hit
Does this PR introduce any user-facing change?
No
How was this patch tested?
mvn -o -pl ql -Dtest=TestVectorizedOrcAcidRowBatchReaderTailCache test