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/06/05 11:49:55 UTC

Ignite Optimistic Transactions

Hi,

https://apacheignite.readme.io/v2.5/docs/transactions#section-optimistic-transactions

As per above link:

*SERIALIZABLE - Stores an entry version upon first read access. Ignite will
fail a transaction at the commit stage if the Ignite engine detects that at
least one of the entries used as part of the initiated transaction has been
modified*

I am little confused with above statement.

When it says it stores an entry version upon first read access, does it
mean that read access happened with in the same transaction only?

Why does ignite fails the transaction in this scenario?

The data I am working on is collocated on same node. I am using Optimistic
concurrency modes and isolation level is Serializable. Is this correct?

While transaction is in progress and some other thread (request) outside
this transaction makes a get request for the data being modified, does
ignite fails the transaction in this case too?




Thanks,
Prasad

Re: Ignite Optimistic Transactions

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

1. The explanation looks confusing. In other words, Ignite remembers entry
version in transaction context at first read access.

2. If another transaction has commited just before the current transaction,
then current transaction will fails with TransactionOptimisticException
as Ignite can't resolve the conflict automatically to preserve SERIALIZABLE
guarantees.
Javadoc says, it is up to user to handle this exception and retry the
transaction.

3. Yes, it is ok.

4. Get request shouldn't change entry version and Ignite shouldn't fail the
transaction in this case.



On Tue, Jun 5, 2018 at 2:49 PM, Prasad Bhalerao <
prasadbhalerao1983@gmail.com> wrote:

> Hi,
>
> https://apacheignite.readme.io/v2.5/docs/transactions#section-optimistic-
> transactions
>
> As per above link:
>
> *SERIALIZABLE - Stores an entry version upon first read access. Ignite
> will fail a transaction at the commit stage if the Ignite engine detects
> that at least one of the entries used as part of the initiated transaction
> has been modified*
>
> I am little confused with above statement.
>
> When it says it stores an entry version upon first read access, does it
> mean that read access happened with in the same transaction only?
>
> Why does ignite fails the transaction in this scenario?
>
> The data I am working on is collocated on same node. I am using Optimistic
> concurrency modes and isolation level is Serializable. Is this correct?
>
> While transaction is in progress and some other thread (request) outside
> this transaction makes a get request for the data being modified, does
> ignite fails the transaction in this case too?
>
>
>
>
> Thanks,
> Prasad
>



-- 
Best regards,
Andrey V. Mashenkov