Yes, that is correct. Note, however, that in this case, node1 will send a NearTxPrepareRequest to node2 and lockMultiple() will be called on node2, not on node1.
2017-03-22 20:26 GMT+03:00 ALEKSEY KUZNETSOV <[email protected]>: > correct me if im wrong. Consider node1 called cache.put(key1, val1); > So node1 creates cacheEntry1. If Affinity function decides node2 holds key1 > then cacheEntry1 will be detached, otherwise cacheEntry isnt detached. > > ср, 22 Мар 2017 г., 18:43 Alexey Goncharuk <[email protected]>: > > > This assertion ensures that an entry locked by an optimistic transaction > is > > locked on a primary or backup node. Like you said, if an entry is > detached, > > it means that it is created by a node to which this entry does not > belong, > > and thus must not be locked. > > > > --AG > > > > 2017-03-22 18:37 GMT+03:00 ALEKSEY KUZNETSOV <[email protected]>: > > > > > When optimistic transaction occures, there is a lock on entities - > > > org.apache.ignite.internal.processors.cache.transactions. > > > IgniteTxManager#lockMultiple > > > Don't you know, why there is a strange string inside this method : > > > > > > assert !entry1.detached() : "Expected non-detached entry for near > > > transaction " + > > > "[locNodeId=" + cctx.localNodeId() + ", entry=" + entry1 + ']'; > > > > > > As far as I know, detached entry is one, created by non-local node. > > > > > > ср, 22 мар. 2017 г. в 18:08, Alexander Fedotov < > > > [email protected] > > > >: > > > > > > > Hi, > > > > > > > > These messages are part of 2-phase commit protocol. > > > > They are sent from a primary node to backup nodes. > > > > > > > > > > > > On Mon, Mar 20, 2017 at 7:41 PM, ALEKSEY KUZNETSOV < > > > > [email protected] > > > > > wrote: > > > > > > > > > Hi all! > > > > > What is the point of sending GridDhtTxPrepareRequest and > > > > > GridDhtTxPrepareResponse messages? > > > > > What is the logic behind processDhtTxFinishRequest and > > > > > processDhtTxPrepareResponse ? > > > > > -- > > > > > > > > > > *Best Regards,* > > > > > > > > > > *Kuznetsov Aleksey* > > > > > > > > > > > > > > > > > > > > > -- > > > > Kind regards, > > > > Alex. > > > > > > > -- > > > > > > *Best Regards,* > > > > > > *Kuznetsov Aleksey* > > > > > > -- > > *Best Regards,* > > *Kuznetsov Aleksey* >
