Skip to content

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
apache:masterfrom
deniskuzZ:HIVE-30044
Open

HIVE-30044: LLAP delete delta tail is read from the filesystem even on a cache hit#6778
deniskuzZ wants to merge 1 commit into
apache:masterfrom
deniskuzZ:HIVE-30044

Conversation

@deniskuzZ

Copy link
Copy Markdown
Member

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

…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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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);
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants