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 <[email protected]> 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. >
