nastra commented on code in PR #14320:
URL: https://github.com/apache/iceberg/pull/14320#discussion_r2431898469


##########
core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java:
##########
@@ -155,8 +158,29 @@ public void commit(TableMetadata base, TableMetadata 
metadata) {
     // the error handler will throw necessary exceptions like 
CommitFailedException and
     // UnknownCommitStateException
     // TODO: ensure that the HTTP client lib passes HTTP client errors to the 
error handler
-    LoadTableResponse response =
-        client.post(path, request, LoadTableResponse.class, headers, 
errorHandler);
+    LoadTableResponse response;
+    try {
+      response = client.post(path, request, LoadTableResponse.class, headers, 
errorHandler);
+    } catch (CommitStateUnknownException e) {
+      // Lightweight reconciliation for snapshot-add-only updates on transient 
unknown commit state
+      if (reconcileOnUnknownSnapshotAdd && updateType == UpdateType.SIMPLE) {

Review Comment:
   nit: might be worth just moving all of this into a separate method for 
future expansion: `reconcileOnSimpleUpdate(...)`



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