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



##########
File path: 
aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java
##########
@@ -194,8 +201,12 @@ void persistGlueTable(Table glueTable, Map<String, String> 
parameters, TableMeta
               .name(tableName)
               .tableType(GLUE_EXTERNAL_TABLE_TYPE)
               .parameters(parameters)
-              .build())
-          .build());
+              .build());
+      // Use Optimistic locking with version id while updating table
+      if(!LOAD_VERSION_ID.isNoop()) {
+        updateTableRequest.versionId(glueTable.versionId());
+      }
+      glue.updateTable(updateTableRequest.build());

Review comment:
       nit: newline after if block

##########
File path: 
aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java
##########
@@ -63,6 +64,12 @@
   private final FileIO fileIO;
   private final LockManager lockManager;
 
+  // Attempt to load versionId if available on the path

Review comment:
       I think it's not "load", but "set" the version ID?




-- 
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: [email protected]

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