You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by ALEKSEY KUZNETSOV <al...@gmail.com> on 2017/03/31 13:29:30 UTC

NearCache transaction qeustion

Hi all!
Consider we have 4 nodes. Node1 contains key1, Node2 contains key1 backup,
and Node3 near-contains (contains in near cache) key1.
Now we commit key1 value change like the following : Node4Cache.put(key1,
updatedValue);

From my point of view Node1 receives prepare request and send
DhtTxPrepareRequest to Node2 and Node3.
processDhtTxPrepareRequest will be executed on Node3 and GridNearTxRemote
will be created by startNearRemoteTx().

What is unclear is the role of GridNearTxRemote ?


-- 

*Best Regards,*

*Kuznetsov Aleksey*

Re: NearCache transaction qeustion

Posted by ALEKSEY KUZNETSOV <al...@gmail.com>.
sorry, but what is sync/async policy ?

пт, 31 мар. 2017 г. в 19:26, Dmitriy Setrakyan <ds...@apache.org>:

> On Fri, Mar 31, 2017 at 6:29 AM, ALEKSEY KUZNETSOV <
> alkuznetsov.sb@gmail.com
> > wrote:
>
> > Hi all!
> > Consider we have 4 nodes. Node1 contains key1, Node2 contains key1
> backup,
> > and Node3 near-contains (contains in near cache) key1.
> > Now we commit key1 value change like the following : Node4Cache.put(key1,
> > updatedValue);
> >
> > From my point of view Node1 receives prepare request and send
> > DhtTxPrepareRequest to Node2 and Node3.
> > processDhtTxPrepareRequest will be executed on Node3 and GridNearTxRemote
> > will be created by startNearRemoteTx().
> >
> > What is unclear is the role of GridNearTxRemote ?
> >
>
> From what I remember, this object is created to handle the near transaction
> (not the backup transaction). Near cache has to be updated in transactional
> fashion, but possibly with a different sync/async policy from primary node,
> so we need to handle the near transaction differently.
>
> D.
>
-- 

*Best Regards,*

*Kuznetsov Aleksey*

Re: NearCache transaction qeustion

Posted by Dmitriy Setrakyan <ds...@apache.org>.
On Fri, Mar 31, 2017 at 6:29 AM, ALEKSEY KUZNETSOV <alkuznetsov.sb@gmail.com
> wrote:

> Hi all!
> Consider we have 4 nodes. Node1 contains key1, Node2 contains key1 backup,
> and Node3 near-contains (contains in near cache) key1.
> Now we commit key1 value change like the following : Node4Cache.put(key1,
> updatedValue);
>
> From my point of view Node1 receives prepare request and send
> DhtTxPrepareRequest to Node2 and Node3.
> processDhtTxPrepareRequest will be executed on Node3 and GridNearTxRemote
> will be created by startNearRemoteTx().
>
> What is unclear is the role of GridNearTxRemote ?
>

From what I remember, this object is created to handle the near transaction
(not the backup transaction). Near cache has to be updated in transactional
fashion, but possibly with a different sync/async policy from primary node,
so we need to handle the near transaction differently.

D.