RussellSpitzer commented on a change in pull request #2328:
URL: https://github.com/apache/iceberg/pull/2328#discussion_r599137838
##########
File path:
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
##########
@@ -203,8 +218,23 @@ protected void doCommit(TableMetadata base, TableMetadata
metadata) {
.orElseGet(ImmutableMap::of);
setHmsTableParameters(newMetadataLocation, tbl, metadata.properties(),
removedProps, hiveEngineEnabled, summary);
- persistTable(tbl, updateHiveTable);
- threw = false;
+ try {
+ persistTable(tbl, updateHiveTable);
+ commitStatus = CommitStatus.SUCCESS;
+ } catch (Throwable persistFailure) {
+ LOG.error("Cannot tell if commit to {}.{} succeeded, attempting to
reconnect and check.",
+ database, tableName, persistFailure);
+ commitStatus = checkCommitStatus(newMetadataLocation, metadata);
+ switch (commitStatus) {
+ case SUCCESS:
+ return;
Review comment:
I just thought it had more symmetry with the other cases, since they are
all function exits explicitly as well. I'll switch it to a break though if you
like that better.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]