huaxingao commented on code in PR #15148:
URL: https://github.com/apache/iceberg/pull/15148#discussion_r2748279851


##########
core/src/main/java/org/apache/iceberg/SetStatistics.java:
##########
@@ -45,17 +59,28 @@ public UpdateStatistics removeStatistics(long snapshotId) {
 
   @Override
   public List<StatisticsFile> apply() {
-    return internalApply(ops.current()).statisticsFiles();
+    return internalApply().statisticsFiles();
   }
 
   @Override
   public void commit() {
-    TableMetadata base = ops.current();
-    TableMetadata newMetadata = internalApply(base);
-    ops.commit(base, newMetadata);
+    Tasks.foreach(ops)
+        .retry(base.propertyAsInt(COMMIT_NUM_RETRIES, 
COMMIT_NUM_RETRIES_DEFAULT))

Review Comment:
   instead of adding a member variable `base`, could we simplify by using local 
base/updated variables per retry attempt (base = taskOps.refresh(); updated = 
internalApply(base); taskOps.commit(base, updated))? 



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