You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/12 20:17:44 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #5222: Don't throw from finally block

rdblue commented on code in PR #5222:
URL: https://github.com/apache/iceberg/pull/5222#discussion_r919390629


##########
aws/src/main/java/org/apache/iceberg/aws/dynamodb/DynamoDbTableOperations.java:
##########
@@ -135,8 +135,7 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) {
           io().deleteFile(newMetadataLocation);
         }
       } catch (RuntimeException e) {
-        LOG.error("Fail to cleanup metadata file at {}", newMetadataLocation, e);
-        throw e;
+        LOG.error("Failed to cleanup metadata file at {}", newMetadataLocation, e);

Review Comment:
   I think this is fine. If it were easier, I'd opt to suppress the exception (maybe we should consider using `runSafely` for that) but since this is just warning that a file wasn't cleaned up, the important thing is not to throw.



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org