Re: Out of order updates for CacheEntryListeners and multi-cache transactions
There is no way to guarantee order of updates different keys. Even for a single cache. The order is guaranteed only for the one key (create / update). On 21.09.2016 19:07, ross.anderson wrote: Hi, So with a simple setup: Two nodes, A and B Two TRANSACTIONAL caches y and z, bothOn node B I register a CacheEntryCreatedListener to cache y and to cache z which just logs directly out on the same thread. On node A I: Start a transaction Insert the value '1', '1' to cache y, and '2', '2' to cache z Commit the transaction On node B I receive '2', '2' for cache z and then '1', '1' for cache y - i.e. in the reverse order to how I inserted them in the caches. Is there any way to guarantee order of updates across multiple caches? Thanks, Ross -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Out-of-order-updates-for-CacheEntryListeners-and-multi-cache-transactions-tp7864.html Sent from the Apache Ignite Users mailing list archive at Nabble.com. -- Taras Ledkov Mail-To: tled...@gridgain.com
Re: Out of order updates for CacheEntryListeners and multi-cache transactions
Interestingly, setting cache key affinity appears to resolve the issue, however is there any way to avoid this for cases where there isn't a common cache key on every item, such as foreign keys? e.g. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Out-of-order-updates-for-CacheEntryListeners-and-multi-cache-transactions-tp7864p7878.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Out of order updates for CacheEntryListeners and multi-cache transactions
I've added a code example to github https://github.com/rossdanderson/IgniteOutOfOrderUpdate I appreciate any help here as it basically means there's no way to guarantee read-after-write consistency for events triggered off of a transaction involving multiple caches, even if they access the data in exactly the same order as the transaction changed it. Cheers, Ross -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Out-of-order-updates-for-CacheEntryListeners-and-multi-cache-transactions-tp7864p7874.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Out of order updates for CacheEntryListeners and multi-cache transactions
Hi, So with a simple setup: Two nodes, A and B Two TRANSACTIONAL caches y and z, bothOn node B I register a CacheEntryCreatedListener to cache y and to cache z which just logs directly out on the same thread. On node A I: Start a transaction Insert the value '1', '1' to cache y, and '2', '2' to cache z Commit the transaction On node B I receive '2', '2' for cache z and then '1', '1' for cache y - i.e. in the reverse order to how I inserted them in the caches. Is there any way to guarantee order of updates across multiple caches? Thanks, Ross -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Out-of-order-updates-for-CacheEntryListeners-and-multi-cache-transactions-tp7864.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.