ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: Ignite Transactions with READ WRITE through and Spring
Date Thu, 11 Feb 2016 22:01:43 GMT
Hi Amit,

Can you please properly subscribe to the mailing list so that the community
receives email notifications? Please follow the instruction here:

amit2103 wrote
> Many thanks for the wonderful project.
> I have two caches of two entities say person and account. Now we need to
> update Person and Account within the same transaction. We are using Spring
> transactions (SprinGTransactionmanager) and a partitioned cache in the
> same VM. Now it works fine sometimes, but sometimes the  first entity goes
> to another Node and the second tries to write through in the first node
> itself. Now second should be inserted in the Db after the first.
> Naturally it causes an Integrity error. We cannot jumble this together
> using Affinity key . As we have another separate JVM service which updates
> Address ( A separate entity and Cache )and Person
> How to solve the first scenario and if we use Affinity keys how to keep
> the Cache values consistent so that data in all JVM node sis in sync. We
> want that in the first case all data in the entities Person and Account
> should be written sync to the Db through the same JVm and in the same case
> also the same happens. 
> Can you guys please suggest an alternative or the way to configure this?
> Please note that my caches are now Atomic and Transactional and are
> Partioned and in memory for each service

Ignite transactions are thread-local, i.e. to enlist two updates into one
transaction, you need to execute both updates from one thread. But you say
that you update them from different nodes, which means that you have two
independent updates, and it's always possible that one of them succeeds and
another does not.

Also did I understand correctly that one of the caches is atomic? Both
caches need to be transactional to execute such a cross-cache transaction.

Makes sense?


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-Transactions-with-READ-WRITE-through-and-Spring-tp2964p2968.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message