Re: 3rd Party Persistence and two phase commit

2018-01-17 Thread Denis Mekhanikov
Alexey, Of cause you can, but you will get an undefined behaviour in this case :) It is assumed, that all nodes are using the same database. Otherwise consistency is not guaranteed. Maybe it is worth to clarify this point in the documentation explicitly. Denis ср, 17 янв. 2018 г. в 15:10, ALEK

Re: 3rd Party Persistence and two phase commit

2018-01-17 Thread ALEKSEY KUZNETSOV
Denis, no, its valid case. you can set certain StoreFactory in cache configuration so that it create *different* instances of database(local) on different nodes. Then, my case will be applied. ср, 17 янв. 2018 г. в 14:45, Denis Mekhanikov : > Aleksey, > > You described an invalid case. Cache s

Re: 3rd Party Persistence and two phase commit

2018-01-17 Thread Denis Mekhanikov
Aleksey, You described an invalid case. Cache stores on all nodes for a single cache should point to the same database. Otherwise data won't be the same in different databases. Different nodes are not supposed to have personal local DBs. If you want nodes to store data on disk in distributed mann

Re: 3rd Party Persistence and two phase commit

2018-01-17 Thread Andrey Nestrogaev
Local store = Apache Ignite Native Persistence? -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: 3rd Party Persistence and two phase commit

2018-01-17 Thread ALEKSEY KUZNETSOV
I meant local store = local db. ср, 17 янв. 2018 г. в 13:52, Andrey Nestrogaev : > Hi, > > Aleksey, what is "local db"? > I did not find anything on this in the documentation. > > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ > -- *Best Regards,* *Kuznetsov Aleksey*

Re: 3rd Party Persistence and two phase commit

2018-01-17 Thread Andrey Nestrogaev
Hi, Aleksey, what is "local db"? I did not find anything on this in the documentation. -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: 3rd Party Persistence and two phase commit

2018-01-17 Thread ALEKSEY KUZNETSOV
Hi! I just wanted to show an example, when Write-through mode is enabled and data is persisted by primary node - not transaction coordinator. Assume, we have transactional cache in cluster, near cache is disabled, node A is primary for key1, node B is neither primary nor backup for key1, and some

Re: 3rd Party Persistence and two phase commit

2018-01-16 Thread vkulichenko
Aleksey, Are you talking about use case when a transaction spawns a distributed cache AND a local cache? If so, this sounds like a very weird use case. Do we even allow this? -Val -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: 3rd Party Persistence and two phase commit

2018-01-16 Thread Denis Magda
Guys, let me step in and explain how it works with a 3rd party database like an RDBMS. 1. Write-through mode (all the changes are persisted right away). Transaction coordinator commits a transaction at the RDBMS level first and only *then* commits it at the cluster level. This is actually what

Re: 3rd Party Persistence and two phase commit

2018-01-11 Thread ALEKSEY KUZNETSOV
Local store means store, that resides only on one node. No other nodes see it. If you don't have local stores in cluster(only distributed ones), then it will be the only db connection within transaction opened. But If you have local stores, then nodes *could open* their own connections to local st

Re: 3rd Party Persistence and two phase commit

2018-01-11 Thread Andrey Nestrogaev
Hi Aleksey, thanks for info, "/Actually, data could be persisted not on tx initiating node, but on primary(I.e. we have partitioned cache and local cache)/" Ok, but no matter where the data is persisted, there will always be only 1 database connection within the transaction, no matter how many nod

Re: 3rd Party Persistence and two phase commit

2018-01-11 Thread ALEKSEY KUZNETSOV
Hi, Andrey! Actually, data could be persisted not on tx initiating node, but on primary(I.e. we have partitioned cache and local cache) . Additionally, data would be persisted on backup node if you enable the corresponding flag. > 11 янв. 2018 г., в 10:12, Andrey Nestrogaev > написал(а): >

Re: 3rd Party Persistence and two phase commit

2018-01-10 Thread Andrey Nestrogaev
Hi Denis, Yes, I have already read the article you mentioned. But it shows an example where the primary data being changed is located on the same node, at least I understand it so. In my original understanding it was that each node creates its own connection to the 3rd database. But perhaps this

Re: 3rd Party Persistence and two phase commit

2018-01-10 Thread Andrey Nestrogaev
Hi Denis, thanks for clarifying! Did I understand you correctly that in any cases all interactions with 3rd party database will occur only on the initial node and the sessionEnd method will be called only once on the initial node? -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: 3rd Party Persistence and two phase commit

2018-01-10 Thread Denis Magda
Covered here: http://gridgain.blogspot.com/2014/09/two-phase-commit-for-in-memory-caches.html — Denis > On Jan 10, 2018, at 8:27 AM, Denis Mekhanikov wrote: > > Hi Andrey! > > Actually, commit to the 3rd party d

Re: 3rd Party Persistence and two phase commit

2018-01-10 Thread Denis Mekhanikov
Hi Andrey! Actually, commit to the 3rd party database will be performed from the node, that initiated the transaction. So, there will be only one transaction on the backing database. Otherwise it is impossible to guarantee data consistency, as you noticed. Denis ср, 10 янв. 2018 г. в 18:58, Andr