rdblue commented on code in PR #10523:
URL: https://github.com/apache/iceberg/pull/10523#discussion_r1678540517


##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -410,6 +409,7 @@ public void commit() {
                   // to ensure that if a concurrent operation assigns the 
UUID, this operation will
                   // not fail.
                   taskOps.commit(base, updated.withUUID());
+                  committedSnapshot.set(newSnapshot);

Review Comment:
   I think the code was written using `newSnapshotId` because we want to 
strictly limit what happens after `commit` is called. After `commit` succeeds, 
the table state has changed and we want to reduce the risk that anything 
happens that would cause the client to mistakenly think that the commit has 
failed. That's why `commit` is the last thing called in this block.
   
   It's not incorrect to change it to what you have, but I definitely prefer 
the original way.



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to