Hi guys. Re: https://issues.jboss.org/browse/ISPN-2090
Summary: in tx caches, when @listener(sync = true), the callback is done by the same thread as the transaction. However, most of the events may not cause any problem, some of them are trigger when the transaction is in the state that cannot attach more commands. So, I want to discuss here what would be the correct behaviour/logic for the callback (note this only affects tx caches) assuming that the callback invokes some operation (get/put/etc.) over the cache. IMO, all the synchronous events should suspend the transaction. This way, we ensure that the operation is not attached to the transaction, the callback has the same behaviour if sync=true and sync=false and also with the events triggered in remote nodes (you will never read any non-committed data from a remote transaction neither attach the operation). Mircea suggestion is the following: I think the correct logic should be: * if isPre() then the value should not be seen when reading the cache * if !isPre() then value should be seen. Not totally sure, but the transaction as return by TransactionManager.getTransaction should not be visible (i.e. suspend it before notifying the listener), as this would result in different behavior on local/remote nodes that get notified. Any other suggestion? Cheers, Pedro _______________________________________________ infinispan-dev mailing list infinispan-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/infinispan-dev