amogh-jahagirdar commented on code in PR #14947:
URL: https://github.com/apache/iceberg/pull/14947#discussion_r2684224414


##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -465,6 +464,10 @@ public void commit() {
                   // to ensure that if a concurrent operation assigns the 
UUID, this operation will
                   // not fail.
                   taskOps.commit(base, updated.withUUID());
+
+                  // Set the staged snapshot AFTER successful commit to ensure 
cleanup uses
+                  // the actually committed snapshot, not one from a 
failed/no-op attempt

Review Comment:
   I think you're right @RussellSpitzer, I misread the code.  The commit could 
no-op without a retry and then the AtomicReference wouldn't be set. 
   
    I'm also doing another pass over the original issue, since it is strange 
how (at least anecdotally) I haven't seen this happen for REST cases (since 
those check for explicitly cleanable failures)



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