Skip to content

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
$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
snazy added a commit to snazy/polaris that referenced this pull request Nov 20, 2025
* Simplify BaseMetaStoreManager.extractStorageConfiguration (apache#2194)

as a static helper method its strongly preferable to not depend on
the full `PolarisCallContext` if not necessary.

* Remove PolarisCallContext from TreeMapMetaStore (apache#2195)

* remove PolarisCallContext from TreeMapMetaStore methods

* reset diagnosticServices in TreeMapMetaStore

* simplify ensure methods

* Remove getCurrentContext from InMemoryStorageIntegration (apache#2201)

* Remove getCurrentContext from JWTBroker (apache#2202)

* fix(deps): update dependency boto3 to v1.39.17 (apache#2211)

* fix(deps): update dependency org.apache.commons:commons-compress to v1.28.0 (apache#2212)

* Enable python client debug flag (apache#2154)

* Enable python client debug flag

* Move debug msg to stderr and move debug enable after option parsing

* Remove postgres_latest as image tag (apache#2045)

* Remove postgres_latest as image tag

* Change image tag to latest for getting started examples

* Change image tag to latest from helm

* fix(deps): update dependency io.smallrye.common:smallrye-common-annotation to v2.13.8 (apache#2222)

* Remove CallContextResolver (apache#2215)

it seems like these were unused leftovers from previous changes

* Replace CommitFailedException with CommitConflictException (apache#2198)

* Replace CommitFailedException with CommitConflictException

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

* JDBC: Include error code + SQL state in exception messages (apache#2220)

* fix(deps): update dependency boto3 to v1.40.0 (apache#2225)

* chore(deps): update actions/stale digest to 8f717f0 (apache#2224)

* Fix Awaitility build configuration (apache#2232)

* Fix compilation warnings in AzureCredentialStorageIntegrationTest (apache#2231)

* Remove CallContext.CURRENT_CONTEXT (apache#2203)

the last callers of `CallContext.getCurrentContext` had been
removed in the following commits:

- 756e535
- e7eb59f
- 4d94745

thus we can now remove the `CURRENT_CONTEXT` threadlocal and all
associated methods.

* NoSQL: adoptions & cosmetics

* Last merged commit 0449d9b

---------

Co-authored-by: Christopher Lambert <xn137@gmx.de>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Yong Zheng <yongzheng0809@gmail.com>
Co-authored-by: Tamas Mate <50709850+tmater@users.noreply.github.com>
Co-authored-by: Alexandre Dutra <adutra@apache.org>
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