You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "ayushtkn (via GitHub)" <gi...@apache.org> on 2026/07/30 08:28:30 UTC
[PR] Fix leaking TARGET_ENTITY_CONCURRENTLY_MODIFIED in AtomicOperationMetaStoreManager for renameEntity [polaris]
ayushtkn opened a new pull request, #5191:
URL: https://github.com/apache/polaris/pull/5191
`renameEntity` in `AtomicOperationMetaStoreManager` already returns `TARGET_ENTITY_CONCURRENTLY_MODIFIED` when the caller's `entityVersion` is stale, but the final persist can still fail with `RetryOnConcurrencyException` from `persistEntityAfterChange` โ `writeEntity` when the entity changes between lookup and write (including grant-records-only conflicts, since JDBC optimistic locking checks both entity_version and grant_records_version).
That exception was uncaught, so renames surfaced as `HTTP 500` instead of the `retryable 503`.
This change wraps the persist call in the same try/catch used by `updateEntityPropertiesIfNotChanged`, mapping `RetryOnConcurrencyException` to `EntityResult(TARGET_ENTITY_CONCURRENTLY_MODIFIED, โฆ)`, which `LocalIcebergCatalog.renameTable` already translates to `PolarisServiceUnavailableException (503 + Retry-After)`. A unit test in `AtomicOperationMetaStoreManagerTest` stubs `writeEntity` to throw and verifies the status mapping.
## Checklist
- [ ] ๐ก๏ธ Don't disclose security issues! (contact security@apache.org)
- [ ] ๐ Clearly explained why the changes are needed, or linked related issues: Fixes #
- [ ] ๐งช Added/updated tests with good coverage, or manually tested (and explained how)
- [ ] ๐ก Added comments for complex logic
- [ ] ๐งพ Updated `CHANGELOG.md` (if needed)
- [ ] ๐ Updated documentation in `site/content/in-dev/unreleased` (if needed)
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix leaking TARGET_ENTITY_CONCURRENTLY_MODIFIED in AtomicOperationMetaStoreManager for renameEntity [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #5191:
URL: https://github.com/apache/polaris/pull/5191#issuecomment-5394707246
Thanks @ayushtkn !
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix leaking TARGET_ENTITY_CONCURRENTLY_MODIFIED in AtomicOperationMetaStoreManager for renameEntity [polaris]
Posted by "ayushtkn (via GitHub)" <gi...@apache.org>.
ayushtkn commented on PR #5191:
URL: https://github.com/apache/polaris/pull/5191#issuecomment-5356662811
@adutra can u help review
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix leaking TARGET_ENTITY_CONCURRENTLY_MODIFIED in AtomicOperationMetaStoreManager for renameEntity [polaris]
Posted by "ayushtkn (via GitHub)" <gi...@apache.org>.
ayushtkn commented on PR #5191:
URL: https://github.com/apache/polaris/pull/5191#issuecomment-5394609949
Thanx @adutra for the review, can you help merge this
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix leaking TARGET_ENTITY_CONCURRENTLY_MODIFIED in AtomicOperationMetaStoreManager for renameEntity [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra merged PR #5191:
URL: https://github.com/apache/polaris/pull/5191
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org