You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Andrey Kornev <an...@hotmail.com> on 2015/09/24 02:26:46 UTC

Implicit transactions

Hello,

I could not find any documentation that describes the behavior of data mutating operations wrt transactions when executed against TRANSACTIONAL caches. 

Specifically, I'd like to know whether or not the mutators start implicit transactions and if so, how do I configure the properties of such transactions (concurrency, isolation, etc). Do I use the global TransactionConfiguration class to configure the defaults? In my case, some of my caches require different (non-default) transactional semantics. What are my options in this case? I can indeed wrap every mutator call into an explicit transaction. Any other options?

I feel it would make the use of the API a bit simpler if it were possible to configure the transactional properties on the CacheConfiguration class directly rather than for each explicitly started transaction.

Thanks
Andrey
 		 	   		  

Re: Implicit transactions

Posted by Alexey Goncharuk <al...@gmail.com>.
Andrey,

The answer is yes, all mutator operations invoked outside of a user
transaction do create an implicit transaction. There is no way to change
the isolation or concurrency of an implicit transaction, and I cannot think
of a case when this should be changed. You can think of any implicit
transaction as of pessimistic repeatable read.

Can you share with us you concerns where you think you need to change those
parameters?

--AG

2015-09-23 17:26 GMT-07:00 Andrey Kornev <an...@hotmail.com>:

> Hello,
>
> I could not find any documentation that describes the behavior of data
> mutating operations wrt transactions when executed against TRANSACTIONAL
> caches.
>
> Specifically, I'd like to know whether or not the mutators start implicit
> transactions and if so, how do I configure the properties of such
> transactions (concurrency, isolation, etc). Do I use the global
> TransactionConfiguration class to configure the defaults? In my case, some
> of my caches require different (non-default) transactional semantics. What
> are my options in this case? I can indeed wrap every mutator call into an
> explicit transaction. Any other options?
>
> I feel it would make the use of the API a bit simpler if it were possible
> to configure the transactional properties on the CacheConfiguration class
> directly rather than for each explicitly started transaction.
>
> Thanks
> Andrey
>