NearCache transaction qeustion

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

NearCache transaction qeustion

voipp
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*
Reply | Threaded
Open this post in threaded view
|

Re: NearCache transaction qeustion

dsetrakyan
On Fri, Mar 31, 2017 at 6:29 AM, ALEKSEY KUZNETSOV <[hidden email]
> 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.
Reply | Threaded
Open this post in threaded view
|

Re: NearCache transaction qeustion

voipp
sorry, but what is sync/async policy ?

пт, 31 мар. 2017 г. в 19:26, Dmitriy Setrakyan <[hidden email]>:

> On Fri, Mar 31, 2017 at 6:29 AM, ALEKSEY KUZNETSOV <
> [hidden email]
> > 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*