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


##########
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:
   If there's a failure I think we'd hit one of the the catch statements below 
or it'd just throw and we would not even end up using staged snapshot later on. 
I think the specific case that's problematic is if it's a no-op after a retry 
due to a network partition after a successful commit?
   
   Either way though, I do believe this fix is correct, just wanted to make 
sure I understood the specific problematic area. 



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