Galder Zamarreno No, I was not aware of such behaviour. When using non-transactional invalidation caches, upon write the entry is 'locked' in PutFromLoadValidator using BeginInvalidationCommand and the entry is removed from the cache. When the transaction completes, InvalidationSynchronization 'unlocks' the record and if the transaction was successful (javax.transaction.Synchronization.afterCompletion is called with status == Status.STATUS_COMMITTED || status == Status.STATUS_COMMITTING) the value is inserted to the cache using PFER semantics. If the transaction is rolled back the PFER does not happen; the cache was invalidated before so we should be safe. So if we can reproduce the flawed behaviour some piece in the chain above has a bug. |