ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Goncharuk <alexey.goncha...@gmail.com>
Subject Re: snapshot transaction isolation
Date Thu, 04 Feb 2016 09:29:07 GMT
If all keys are known in advance, how is it different from starting a
pessimistic transaction and invoking getAll() on those keys? Introducing a
new concept with such restrictions does not makes sense to me.

2016-02-04 1:27 GMT+03:00 Dmitriy Setrakyan <dsetrakyan@apache.org>:

> Igniters,
>
> I keep hearing questions from users about the snapshot isolation. Currently
> ignite provides Optimistic and Pessimistic
> <
> https://apacheignite.readme.io/docs/transactions#optimistic-and-pessimistic
> >
> transactions [1]. This modes ensure that transactional values are
> consistent with each other on 1st access of each value.
>
> However, some use cases require that transactional values are consistent
> with each other not at 1st access, but at transaction start time. After
> giving it some thought, I think we can support it with minimal effort, if
> we add a few restrictions. For example, we can easily support it if users
> specify all the keys at the beginning of the transaction, for example
>
>    1. User tells Ignite which keys he/she plans to transact on
>    2. Ignite preemptively acquires locks on all these keys
>    3. After locks are acquired, user has assurance that values will not
>    change outside of this transaction and are consistent with teacher.
>    4. Locks are released upon commit
>
> The above algorithm will also perform better, as the initial looks will be
> acquired in bulk, and not individually.
>
> Thoughts?
>
> [1]
> https://apacheignite.readme.io/docs/transactions#optimistic-and-pessimistic
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message