superdiaodiao commented on PR #17464: URL: https://github.com/apache/iceberg/pull/17464#issuecomment-5580680592
Thanks @uros-b for the reviews and for confirming the follow-ups. @nastra @pvary @nk1506 — would one of you be able to take a look? Picking you three because this spans both modules the fix touches: `nastra` and `nk1506` have the most recent history on `BaseMetastoreTableOperations`, `pvary` and `nk1506` on the Hive side. **What it fixes.** When a create commit fails before the table or view has ever been persisted, `checkCurrentMetadataLocation` is reached with null metadata and NPEs. The commit status check then reports `FAILURE` instead of `UNKNOWN`, so a create that may actually have succeeded server-side is not retried. **Change.** A null guard in `BaseMetastoreTableOperations.checkCurrentMetadataLocation`, plus the equivalent in `HiveViewOperations`. **Tests**, both added in response to @uros-b's review and both failing on `main` without the fix: - `TestHiveCommits.testThriftExceptionUnknownStateOnCreateCommitWhenTableNeverPersisted` (639bd29) — drives a failed create through the real `HiveTableOperations` with a spied `persistTable` throwing `TException` - `TestHiveViewCommits` equivalent for the create-view path (7105ad0) CI is green. Happy to rebase or adjust scope if you'd prefer it split differently. -- 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]
