You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Prasad Bhalerao <pr...@gmail.com> on 2018/04/11 05:40:45 UTC

Issue IGNITE-3471

https://issues.apache.org/jira/browse/IGNITE-3471

Can we please have a fix for this issue in ignite 2.5 version?


Reason:

I am trying to test the distributed transaction support using following
piece of code. While debugging the code I observed that code executes on
client node first and after doing commit the code executes on a node which
owns that kay.

What I am trying to do is, to collocate the data to avoid the network call
as my data in real use case is going to big. But while debugging the code,
I observed that entry processor first executes on client node, gets all the
data executes the task. and after commit executes the same code on remote
node.

Can someone please explain this behavior? My use case to execute the task
on nodes which owns the data in single transaction.

private static void executeEntryProcessorTransaction(IgniteCache<Long,
Person> cache) {
    Person val=null;
    try (Transaction tx = Ignition.ignite().transactions().txStart(
TransactionConcurrency.OPTIMISTIC,TransactionIsolation.SERIALIZABLE)) {
  long myid =6l;
        CacheEntryProcessor entryProcessor = new MyEntryProcessor();
        cache.invoke(myid, entryProcessor);
        System.out.println("Overwrote old value: " + val);
        val = cache.get(myid);
        System.out.println("Read value: " + val);

        tx.commit();
        System.out.println("Read value after commit: " +   cache.get(myid));
    }
}

Thanks,
Prasad

Re: Issue IGNITE-3471

Posted by dkarachentsev <dk...@gridgain.com>.
Hi,

Yes, for complex transaction this workaround will not work. So you need
either wait for fix or avoid using EntryProcessor for now.

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Issue IGNITE-3471

Posted by Prasad Bhalerao <pr...@gmail.com>.
Hi,

Wrapping executeEntryProcessorTransaction() method in affinity run will
help if the whole data is collocated on same node. But In my case data is
distributed across cluster and I want to update whole data in single
distributed transaction.
If I collocate data on single node then cluster will become unbalanced and
only need to start the second node will be to have just a backup node.
Any idea when this fix will be available?

My use case:
I have


Thanks,
Prasad

On Wed, Apr 11, 2018 at 8:50 PM, dkarachentsev <dk...@gridgain.com>
wrote:

> Hi Prasad,
>
> This issue could not be completed in 2.5 as it's done in a low priority. As
> a workaround, you can wrap your executeEntryProcessorTransaction() method
> into affinity run [1], and no additional value transferring will happen.
>
> [1] https://apacheignite.readme.io/docs/collocate-compute-and-data
>
> Thanks!
> Dmitry
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Issue IGNITE-3471

Posted by dkarachentsev <dk...@gridgain.com>.
Hi Prasad,

This issue could not be completed in 2.5 as it's done in a low priority. As
a workaround, you can wrap your executeEntryProcessorTransaction() method
into affinity run [1], and no additional value transferring will happen.

[1] https://apacheignite.readme.io/docs/collocate-compute-and-data

Thanks!
Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/