ayushtkn opened a new pull request, #5134: URL: https://github.com/apache/polaris/pull/5134
On the create path, `JdbcBasePersistenceImpl.writeEntities` checked whether each entity already existed (for idempotent retries) by calling `lookupEntity`, which fetches the entire row โ including the large JSON `properties/internal_properties` blobs โ only to discard everything but the fact that a row exists. This replaces that with a cheap `SELECT 1 โฆ LIMIT 1` existence probe (`entityExists`) issued on the transaction connection, so a retried create stays idempotent without pulling back full entities; the `update` path (where the original entity is already known) skips the check entirely. Behavior is unchanged โ only the query cost drops. Includes tests asserting the create path issues an existence-only query (no property columns) and the update path issues no pre-lookup at all. ## Checklist - [ ] ๐ก๏ธ Don't disclose security issues! (contact [email protected]) - [ ] ๐ 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
