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/02/21 08:38:01 UTC
[GitHub] [iceberg] rajarshisarkar commented on a change in pull request #4166: AWS: Use Glue optimistic locking while updating table
rajarshisarkar commented on a change in pull request #4166:
URL: https://github.com/apache/iceberg/pull/4166#discussion_r810885773
##########
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 have made the changes.
##########
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:
I have made the changes.
--
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