allthingssecurity commented on PR #29437:
URL: https://github.com/apache/camel/pull/29437#issuecomment-6735714376

   Thanks, good catch. Fixed in 04fcafe:
   - `insert` now keeps the key alive only after its transaction commits, both 
for a new row and for a seized orphan lock. It registers a 
`TransactionSynchronization` whose `afterCommit` adds the key, so after a 
rollback the key is never kept alive.
   - A `remove` of the key, or `clear()`, later in the same transaction cancels 
that pending add, so a key inserted and deleted in one transaction is not kept 
alive either.
   - Without a transaction the key is added at once, as before.
   
   The new `JdbcOrphanLockAwareIdempotentRepositoryTransactionTest` covers the 
rollback and commit cases for an insert and for a seized orphan lock, plus 
add-then-remove and add-then-clear. On the previous head the rollback and 
commit tests fail; with the fix all 18 orphan-lock tests pass.
   
   _Claude Code on behalf of allthingssecurity_


-- 
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