As per this link
http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-0-transaction-restrictions-in-multi-threading-environment-td19007.html
,it is safe to use multithreaded cache updates  inside single ignite
transaction.

On Wed, Jun 6, 2018 at 11:00 PM, Prasad Bhalerao <
[email protected]> wrote:

> Hi Andrey, I am starting new mail thread as my previous mails were not
> appearing in ignite archive even after sending it multiple times. But I am
> receiving latest group mails.
>
>
> *Question:* Is it safe to use Java executor service inside ignite
> transaction to do parallel processing on same cache?
>
> My affinity key is subscriptionId and one subscription Id can have
> multiple asset groups.
> In my application I submit the ignite runnable task using subscriptionId
> affinity key. Now inside this ignite task I submit Callable tasks per
> assetGroupId to java executor service to process (remove/add and update)
> cache entries in parallel fashion
> This whole thing is happening inside ignite transaction and it works
> perfectly fine.
> Problem occurs only when I update and then read the same entry and update
> it again in same transaction. This is one particular corner case.
>
>
>
> Andrey said "*In your case, task is executed in separate thread
> of executor service which knows no nothing about transaction context and
> starts a new transaction in new context.*
> *Moving transactional context to different thread is not supported for
> now".*
>
> Are you sure about *"Moving transactional context to different thread is
> not supported for now." *Cause it is working fine in my case and I don't
> see any documentation which talks about this. I have used executor service
> for parallel processing inside ignite transaction at many places in my
> code. Can you please confirm about this?
>
>
>
>
> Thanks,
> Prasad
>

Reply via email to