jfz commented on a change in pull request #3733:
URL: https://github.com/apache/iceberg/pull/3733#discussion_r769888435
##########
File path: core/src/main/java/org/apache/iceberg/BaseTransaction.java
##########
@@ -254,16 +256,13 @@ private void commitCreateTransaction() {
((SnapshotProducer) update).cleanAll();
}
});
-
- throw e;
-
- } finally {
// create table never needs to retry because the table has no previous
state. because retries are not a
// concern, it is safe to delete all of the deleted files from
individual operations
Tasks.foreach(deletedFiles)
.suppressFailureWhenFinished()
.onFailure((file, exc) -> LOG.warn("Failed to delete uncommitted
file: {}", file, exc))
.run(ops.io()::deleteFile);
+ throw e;
Review comment:
I added basic cleanup checks by counting number of files left.
--
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]