ayushtkn commented on code in PR #5138:
URL: https://github.com/apache/polaris/pull/5138#discussion_r3644029131
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/CatalogHandlerUtils.java:
##########
@@ -513,7 +514,14 @@ public TableMetadata commit(TableOperations ops,
UpdateTableRequest request) {
}
TableMetadata.Builder newMetadataBuilder =
TableMetadata.buildFrom(newBase);
- request.updates().forEach((update) ->
update.applyTo(newMetadataBuilder));
+ try {
+ request.updates().forEach((update) ->
update.applyTo(newMetadataBuilder));
+ } catch (RetryableValidationException e) {
+ // Surface as a retryable 409, matching Iceberg
CatalogHandlers.commit.
+ throw new ValidationFailureException(
+ new CommitFailedException(
+ e, "Validation failed, please retry: %s",
e.getMessage()));
Review Comment:
I added a comment above but this suggestion is wrong, Server-side retry
won’t help because the stale sequence number is in the request payload itself;
the client must refresh metadata and retry. This matches upstream Iceberg
`CatalogHandlers.commit()`
https://github.com/apache/iceberg/blob/6976e020b894f6a6777704df2b8c4458cb291ae9/core/src/main/java/org/apache/iceberg/rest/CatalogHandlers.java#L641-L648
--
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]