amogh-jahagirdar commented on code in PR #12863:
URL: https://github.com/apache/iceberg/pull/12863#discussion_r2067768617


##########
core/src/main/java/org/apache/iceberg/io/BaseTaskWriter.java:
##########
@@ -347,9 +346,9 @@ private void closeCurrent() throws IOException {
           if (currentRows == 0L) {
             try {
               io.deleteFile(currentFile.encryptingOutputFile());
-            } catch (UncheckedIOException e) {
-              // the file may not have been created, and it isn't worth 
failing the job to clean up,
-              // skip deleting
+            } catch (RuntimeException e) {

Review Comment:
   Thanks @xiaoxuandev @geruh . I generally agree with the change, since 
*regardless of the type of failure here*, it should not blow up the overall 
write being performed since this is just a best effort cleanup. I also agree 
with a warn log.
   
   My only ask is we follow the same pattern like we do in other places and 
just use Tasks to express this.
   
   Check out 
https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/BaseTransaction.java#L485
 , which essentially has the same best effort cleanup that we want.



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

Reply via email to