Skip to content

Replace CommitFailedException with CommitConflictException #2198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2025

Conversation

tmater
Copy link
Contributor

@tmater tmater commented Jul 28, 2025

In some cases, we were using CommitFailedException to represent commit conflicts, which returns the correct 409 response but is tied to Iceberg.

However, some of these conflicts originate from Polaris, making CommitConflictException a more appropriate and accurate choice.

This change updates those instances to improve clarity and exception handling semantics.

Resolves #2168

In some cases, we were using CommitFailedException to represent commit
conflicts, which returns the correct 409 response but is tied to Iceberg.

However, some of these conflicts originate from Polaris, making
CommitConflictException a more appropriate and accurate choice.

This change updates those instances to improve clarity and exception
handling semantics.

Resolves apache#2168
Copy link
Contributor

@dimas-b dimas-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, @tmater ! The changes LGTM overall.

Copy link
Contributor Author

@tmater tmater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dimas-b , thank you for the review!
Updated the change, LMK your thoughts.

@tmater tmater marked this pull request as ready for review July 29, 2025 18:15
dimas-b
dimas-b previously approved these changes Jul 29, 2025
Copy link
Contributor

@dimas-b dimas-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks, @tmater !

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jul 29, 2025
@dimas-b dimas-b requested a review from adutra July 29, 2025 18:52
adutra
adutra previously approved these changes Jul 30, 2025
@@ -635,7 +635,7 @@ paths:
TableToUpdateDoesNotExist:
$ref: '#/components/examples/NoSuchTableError'
'409':
description: Conflict - CommitFailedException, one or more requirements failed. The client may retry.
description: Conflict - Transaction commit failed due to concurrent modifications. The client may retry.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is generated; the change should go into the appropriate spec and then this file needs to be regenerated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point about spec change.

However, the code fix in this PR does not require spec changes. I believe the client-facing behaviour is not changed by this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmater : please rollback changes to this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, reverted it.

Copy link
Contributor

@eric-maynard eric-maynard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec change here wasn't implemented correctly, but otherwise the change seems reasonable if inconsequential

@github-project-automation github-project-automation bot moved this from Ready to merge to PRs In Progress in Basic Kanban Board Jul 30, 2025
@tmater tmater dismissed stale reviews from adutra and dimas-b via 81efaca July 31, 2025 10:50
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jul 31, 2025
@dimas-b dimas-b merged commit 5e43a07 into apache:main Jul 31, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate usage of CommitFailedException and CommitConflictException
5 participants