perf: Improve global index performance for commit time ordering#17797
Open
yihua wants to merge 1 commit into
Open
perf: Improve global index performance for commit time ordering#17797yihua wants to merge 1 commit into
yihua wants to merge 1 commit into
Conversation
Collaborator
nsivabalan
approved these changes
Jan 9, 2026
danny0405
reviewed
Jan 9, 2026
| // this phase since the writer path will merge when rewriting the files as part of the upsert operation. | ||
| boolean requiresMergingWithOlderRecordVersion = shouldUpdatePartitionPath || table.getMetaClient().getTableConfig().getTableType() == HoodieTableType.MERGE_ON_READ; | ||
| boolean requiresMergingWithOlderRecordVersion = shouldUpdatePartitionPath | ||
| || (!isCommitTimeOrdered && table.getMetaClient().getTableConfig().getTableType() == HoodieTableType.MERGE_ON_READ); |
danny0405
approved these changes
Jan 9, 2026
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.
Describe the issue this Pull Request addresses
When using
COMMIT_TIME_ORDERINGmerge mode with global indexes (RLI, Global Simple, Global Bloom) on MOR tables, the current implementation unnecessarily reads and merges with older record versions (by reading the latest file slice) during the tagging phase. This is wasteful because with commit time ordering, the newer commit always wins - there's no need to compare event timestamps.This PR optimizes the tagGlobalLocationBackToRecords method in HoodieIndexUtils to skip the merge phase for
COMMIT_TIME_ORDERINGmode on MOR tables, reducing I/O overhead.Summary and Changelog
Performance optimization for global index with
COMMIT_TIME_ORDERING:HoodieIndexUtils.tagGlobalLocationBackToRecords()to skip merging with older record versions whenCOMMIT_TIME_ORDERINGis used on MOR tablesAdded comprehensive test suite
TestGlobalIndexCommitTimeOrdering.javacovering:Impact
Reduced I/O during write operations when using global indexes (RLI, Global Simple, Global Bloom) with
COMMIT_TIME_ORDERINGon MOR tables.Risk Level
low
Documentation Update
none
Contributor's checklist