singhpk234 commented on code in PR #15126:
URL: https://github.com/apache/iceberg/pull/15126#discussion_r2726389306


##########
core/src/main/java/org/apache/iceberg/rest/CatalogHandlers.java:
##########
@@ -633,7 +634,20 @@ static TableMetadata commit(TableOperations ops, 
UpdateTableRequest request) {
 
                 // apply changes
                 TableMetadata.Builder metadataBuilder = 
TableMetadata.buildFrom(base);
-                request.updates().forEach(update -> 
update.applyTo(metadataBuilder));
+                try {
+                  request.updates().forEach(update -> 
update.applyTo(metadataBuilder));
+                } catch (ValidationException e) {
+                  // Sequence number conflicts from concurrent commits are 
retryable by the client,
+                  // but server-side retry won't help since the sequence 
number is in the request.

Review Comment:
   This is an interesting point ! since the snapshot obj is created in the 
client and sent to the server the sequence number is locked in and server can't 
do much fail fast seems reasonable.
   
   I wonder if we can refactor / introduce some other mechanism rather than 
relying on exception message text. 



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