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 2019/07/07 09:52:40 UTC

[GitHub] [incubator-iceberg] aokolnychyi commented on a change in pull request #264: Add table UUID

aokolnychyi commented on a change in pull request #264: Add table UUID
URL: https://github.com/apache/incubator-iceberg/pull/264#discussion_r300858704
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/SnapshotProducer.java
 ##########
 @@ -231,7 +231,9 @@ public void commit() {
             Snapshot newSnapshot = apply();
             newSnapshotId.set(newSnapshot.snapshotId());
             TableMetadata updated = base.replaceCurrentSnapshot(newSnapshot);
-            taskOps.commit(base, updated);
+            // if the table UUID is missing, add it here. the UUID will be re-created each time this operation retries
+            // to ensure that if a concurrent operation assigns the UUID, this operation will not fail.
+            taskOps.commit(base, updated.withUUID());
 
 Review comment:
   Just to make sure I understand: table UUID isn't supposed to change once assigned and cannot be set back to null, right?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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