adutra commented on code in PR #8857:
URL: https://github.com/apache/iceberg/pull/8857#discussion_r1369938013


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieIcebergClient.java:
##########
@@ -540,4 +604,35 @@ public void close() {
       api.close();
     }
   }
+
+  private void commitRetry(String message, Operation... ops)
+      throws BaseNessieClientServerException {
+
+    CommitMultipleOperationsBuilder commitBuilder =
+        api.commitMultipleOperations()
+            .commitMeta(NessieUtil.buildCommitMetadata(message, 
catalogOptions))
+            .operations(Arrays.asList(ops));
+
+    Tasks.foreach(commitBuilder)
+        .retry(5)
+        .stopRetryOn(NessieReferenceNotFoundException.class, 
NessieReferenceConflictException.class)
+        .throwFailureWhenFinished()
+        .onFailure((o, exception) -> refresh())

Review Comment:
   I rather agree. I also question the usage of 
`BaseNessieClientServerException` as the upper bound for checked exceptions. 
It's a good idea to revisit that logic indeed.



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