jackye1995 commented on a change in pull request #1823:
URL: https://github.com/apache/iceberg/pull/1823#discussion_r548105749



##########
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();
+    }
+  }
+
+  private void acquireLock() {

Review comment:
       This is also following the behavior of `HiveTableOperations`. I think it 
makes sense to throw `CommitFailedException` because locking is a part of 
`doCommit`, so the failure to get lock is a type of commit failure. In the 
approach you described, the wait time can be long, and in the current approach 
the wait time is short for each retry.




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

Reply via email to