rdblue commented on a change in pull request #1823:
URL: https://github.com/apache/iceberg/pull/1823#discussion_r547529629
##########
File path:
aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java
##########
@@ -117,9 +120,39 @@ protected void doCommit(TableMetadata base, TableMetadata
metadata) {
if (exceptionThrown) {
io().deleteFile(newMetadataLocation);
}
+
+ unlock();
Review comment:
Can you put this in a separate try/finally block?
If any of the exceptions above is thrown, then this needs to delete the
metadata location. But if that for some reason fails, this also needs to
attempt to unlock. Since both unlock and deleteFile must be done even if the
other fails, we need to separate them into different finally blocks that are
independent.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]