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/05/02 15:09:57 UTC

Transaction commit taking too much time

Hi,

I am updating multiple caches in single transaction. Data is collocated in
same partition and hence on same node.

I am doing add and remove operation using putAll and removeAll operation.

I am trying to update around 100K cache entries in each cache and total
number of caches involved in this transaction are 3.

When I do transaction.commit in my code it takes around 7 minutes just to
commit the transaction.

Ignite native persistence is disabled now but I am going to need it later.

I am getting transaction as follows.

Transaction tx =
        ignite.transactions().txStart(TransactionConcurrency.OPTIMISTIC,
                                      TransactionIsolation.SERIALIZABLE)


Can someone please advise?



Thanks,
Prasad

Re: Transaction commit taking too much time

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

I found the problem. It happened because of small mistake in my code.
Reason: Write through was enabled and the batch size for addBatch operation
in writeAll method was 1. Because of this it was taking time. When I
changed the batch size to 10,000 the problem got resolved.

Thanks,
Prasad

On Wed, May 2, 2018 at 10:26 PM, Evgenii Zhuravlev <e.zhuravlev.wk@gmail.com
> wrote:

> Hi,
>
> Could you share full reproducer?
>
> Thanks,
> Evgenii
>
> 2018-05-02 18:09 GMT+03:00 Prasad Bhalerao <pr...@gmail.com>:
>
>> Hi,
>>
>> I am updating multiple caches in single transaction. Data is collocated
>> in same partition and hence on same node.
>>
>> I am doing add and remove operation using putAll and removeAll operation.
>>
>> I am trying to update around 100K cache entries in each cache and total
>> number of caches involved in this transaction are 3.
>>
>> When I do transaction.commit in my code it takes around 7 minutes just to
>> commit the transaction.
>>
>> Ignite native persistence is disabled now but I am going to need it later.
>>
>> I am getting transaction as follows.
>>
>> Transaction tx =
>>         ignite.transactions().txStart(TransactionConcurrency.OPTIMISTIC,
>>                                       TransactionIsolation.SERIALIZABLE)
>>
>>
>> Can someone please advise?
>>
>>
>>
>> Thanks,
>> Prasad
>>
>>
>>
>

Re: Transaction commit taking too much time

Posted by Evgenii Zhuravlev <e....@gmail.com>.
Hi,

Could you share full reproducer?

Thanks,
Evgenii

2018-05-02 18:09 GMT+03:00 Prasad Bhalerao <pr...@gmail.com>:

> Hi,
>
> I am updating multiple caches in single transaction. Data is collocated in
> same partition and hence on same node.
>
> I am doing add and remove operation using putAll and removeAll operation.
>
> I am trying to update around 100K cache entries in each cache and total
> number of caches involved in this transaction are 3.
>
> When I do transaction.commit in my code it takes around 7 minutes just to
> commit the transaction.
>
> Ignite native persistence is disabled now but I am going to need it later.
>
> I am getting transaction as follows.
>
> Transaction tx =
>         ignite.transactions().txStart(TransactionConcurrency.OPTIMISTIC,
>                                       TransactionIsolation.SERIALIZABLE)
>
>
> Can someone please advise?
>
>
>
> Thanks,
> Prasad
>
>
>