Hive: Double check commit status for view commit conflicts#17087
Open
thswlsqls wants to merge 1 commit into
Open
Hive: Double check commit status for view commit conflicts#17087thswlsqls wants to merge 1 commit into
thswlsqls wants to merge 1 commit into
Conversation
HiveViewOperations.doCommit() threw CommitFailedException immediately on an HMS "modified" exception, without checking whether the commit had actually succeeded. HiveTableOperations.doCommit() already double checks this case via checkCommitStatusStrict() (PR apache#12637). This mirrors that fix on the view commit path so a retried alter_table call that actually succeeded is no longer reported as a failed commit. Generated-by: Claude Code
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.
Closes #17074
Summary
HiveViewOperations.doCommit()threwCommitFailedExceptionimmediately on the HMS "modified" message, without checking whether the alter actually succeeded.HiveTableOperations.doCommit(), which already double-checks viacheckCommitStatusStrict()before deciding the commit truly failed.Testing done
TestHiveViewCommits#modifiedConcurrentlyExceptionSucceedsWhenActuallyCommitted, which spiespersistTableto actually persist then throw a "modified" exception, and asserts the commit completes andrefresh()reflects the new metadata location../gradlew :iceberg-hive-metastore:check— 13/13 tests passed inTestHiveViewCommits, 20/20 inTestHiveCommitLocks, 16/16 inTestHiveCommits; full module check build succeeded.