dramaticlly commented on code in PR #13653: URL: https://github.com/apache/iceberg/pull/13653#discussion_r2229541297
########## core/src/main/java/org/apache/iceberg/BaseTransaction.java: ########## @@ -499,6 +487,17 @@ private void cleanAllUpdates() { }); } + private void deleteUncommittedFiles(Iterable<String> paths) { + if (ops.io() instanceof SupportsBulkOperations) { + ((SupportsBulkOperations) ops.io()).deleteFiles(paths); + } else { + Tasks.foreach(paths) + .suppressFailureWhenFinished() + .onFailure((file, exc) -> LOG.warn("Failed to delete uncommitted file: {}", file, exc)) + .run(ops.io()::deleteFile); + } + } Review Comment: Sounds fair, looks around other places where this was handled, figured I shall catch the exception as some of these are used in final clause. I think put them in a FileIOUtil helps, only thing might differ would be the exception message. To keep the scope of the change, let me follow up in a separate PR for extraction -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org