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

 ##########
 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:
   Correct. This identifies a table so you can't start an operation, drop and 
recreate the table, and then complete the operation. We had it happen once.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to