rdblue commented on a change in pull request #144: Delete temporary metadata 
file when rename fails.
URL: https://github.com/apache/incubator-iceberg/pull/144#discussion_r271912790
 
 

 ##########
 File path: 
core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java
 ##########
 @@ -152,6 +154,19 @@ public void commit(TableMetadata base, TableMetadata 
metadata) {
     this.shouldRefresh = true;
   }
 
+  /**
+   * Deletes the file from the file system. Any RuntimeIOException will be 
swallowed and logged.
+   *
+   * @param tempMetadataFile the file to be deleted.
+   */
+  private void deleteFileNoThrow(final Path tempMetadataFile) {
 
 Review comment:
   Instead of catching a runtime IO exception and logging it, I think this 
should catch any runtime exception and add it as a suppressed exception to the 
CommitFailedExeception.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to