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]

Reply via email to