singhpk234 commented on code in PR #12818: URL: https://github.com/apache/iceberg/pull/12818#discussion_r2105697905
########## core/src/main/java/org/apache/iceberg/rest/ErrorHandlers.java: ########## @@ -91,7 +91,19 @@ public void accept(ErrorResponse error) { case 404: throw new NoSuchTableException("%s", error.message()); case 409: - throw new CommitFailedException("Commit failed: %s", error.message()); + if (error.isRetried()) { + // If the request was retried, and if it was 409, it could probably also mean that + // HTTP retries, and the IRC service would have actually applied the commit in the + // persistence. This would now mean since the base has changed it would conflict with + // itself, in cases like this its best not to mark this as failed instead make this + // is a commit state unknown. + throw new CommitStateUnknownException( + new ServiceFailureException( Review Comment: come up with better inner exception -- 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