You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Vladimir Ozerov <vo...@gridgain.com> on 2017/08/23 14:20:11 UTC

DML and transaction boundaries

Igniters,

Our docs say that DML statements are executed outside of current
transaction. This is not true - it is enlisted into transaction at the
moment. We need to fix that, but how?

Possible solutions:
1) Execute DML outside of TX, similar to current IgniteCache#getAllOutTx
2) Or throw an exception - DML cannot be executed inside TX at all

I prefer the second. For now DML inside TX simply doesn't make sense. It is
prone to deadlocks and has unpredictable semantics. Let's restrict it
explicitly.

Thoughts?

Vladimir.

Re: DML and transaction boundaries

Posted by Dmitriy Setrakyan <ds...@apache.org>.
I prefer the (3) - print out a warning in the log. Otherwise, if you throw
an exception, you are risking breaking all the existing user code.

On Wed, Aug 23, 2017 at 7:20 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Igniters,
>
> Our docs say that DML statements are executed outside of current
> transaction. This is not true - it is enlisted into transaction at the
> moment. We need to fix that, but how?
>
> Possible solutions:
> 1) Execute DML outside of TX, similar to current IgniteCache#getAllOutTx
> 2) Or throw an exception - DML cannot be executed inside TX at all
>
> I prefer the second. For now DML inside TX simply doesn't make sense. It is
> prone to deadlocks and has unpredictable semantics. Let's restrict it
> explicitly.
>
> Thoughts?
>
> Vladimir.
>