RussellSpitzer commented on a change in pull request #2328:
URL: https://github.com/apache/iceberg/pull/2328#discussion_r592612549



##########
File path: 
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
##########
@@ -168,7 +168,8 @@ protected void doCommit(TableMetadata base, TableMetadata 
metadata) {
       if (tbl != null) {
         // If we try to create the table but the metadata location is already 
set, then we had a concurrent commit
         if (base == null && 
tbl.getParameters().get(BaseMetastoreTableOperations.METADATA_LOCATION_PROP) != 
null) {
-          throw new AlreadyExistsException("Table already exists: %s.%s", 
database, tableName);
+          commitFailed = true;
+          throw new CommitFailedException("Table already exists: %s.%s", 
database, tableName);

Review comment:
       As noted in SnapshotProducer, we must throw a commit failed exception if 
we expect cleanup




----------------------------------------------------------------
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]

Reply via email to