owenmonn opened a new pull request, #19263: URL: https://github.com/apache/iceberg/pull/19263
When the strict commit status check cannot find the new metadata location, `BaseMetastoreTableOperations` now reports a failure only while the newest entry in the new metadata's log, normally its base, is still current or in the metadata log. Its entries precede the commit and are trimmed oldest first, so an applied commit cannot have been trimmed while that entry is present. Otherwise the status is unknown and Hive does not retry, also for a genuine conflict when more than `write.metadata.previous-versions-max` commits landed during the metastore call, since it looks like a trimmed applied commit. Taking that location from the new metadata keeps the signature unchanged, so the copies of `HiveTableOperations` in Apache Hive and Delta need no change. Closes #19262 Test plan: `TestBaseMetastoreTableOperations` covers both outcomes of the new check: unknown when the base has left the metadata log, and failure when the base is still in the log after an older entry was trimmed. `TestHiveCommits` covers the reported case in `HiveTableOperations`: a lock-free commit applied before two later commits pushed it and its base out of a one-entry metadata log fails with `CommitStateUnknownException` instead of `CommitFailedException`, so it is not retried. --- **AI Disclosure** - Model: Claude Opus 5.5 - Platform/Tool: Claude Code - Human Oversight: fully reviewed - Prompt Summary: Stop the strict commit status check from failing a commit that was applied but has left the metadata log, by failing only while the newest entry in the new metadata's log, normally its base, is still in the log. The code change, the tests, and this description are generated; the choice of the rule and of fixing it in core is the author's. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
