Re: Transaction Deadlock Detection exception is not wrapped by the timeout exception

2017-06-19 Thread Denis Magda
Here is a ticket, please fix the degradation in 2.1: https://issues.apache.org/jira/browse/IGNITE-5548 — Denis > On Jun 14, 2017, at 3:17 PM, Denis Magda wrote: > > Andrey, > >> On Jun 14, 2017, at 3:11 AM, Andrey Gura wrote: >> >> Guys, >

Re: Transaction Deadlock Detection exception is not wrapped by the timeout exception

2017-06-14 Thread Denis Magda
Andrey, > On Jun 14, 2017, at 3:11 AM, Andrey Gura wrote: > > Guys, > > first of all I should notice that thre is difference between eception > handling in pessimistic and optimistic transaction, because in > optimistic txs we can't throw CacheException on tx.commit() call. > How do we use th

Re: Transaction Deadlock Detection exception is not wrapped by the timeout exception

2017-06-14 Thread Andrey Gura
Guys, first of all I should notice that thre is difference between eception handling in pessimistic and optimistic transaction, because in optimistic txs we can't throw CacheException on tx.commit() call. The second, I'm surprised why TransactionTimeoutException is replaced by IgniteCheckedExcept

Re: Transaction Deadlock Detection exception is not wrapped by the timeout exception

2017-06-13 Thread Dmitriy Setrakyan
On Tue, Jun 13, 2017 at 5:06 PM, Denis Magda wrote: > e.getCause() might return ‘null’ and you’ll get NullPointerException > trying to execute e.getCause().getCause(). > > Ideally, we need to throw TransactionDeadlockException like it’s done in > .NET. > Agree, looks odd, but because of JSR107 w

Re: Transaction Deadlock Detection exception is not wrapped by the timeout exception

2017-06-13 Thread Denis Magda
e.getCause() might return ‘null’ and you’ll get NullPointerException trying to execute e.getCause().getCause(). Ideally, we need to throw TransactionDeadlockException like it’s done in .NET. — Denis > On Jun 13, 2017, at 4:43 PM, Dmitriy Setrakyan wrote: > > This looks a bit confusing. Why is

Re: Transaction Deadlock Detection exception is not wrapped by the timeout exception

2017-06-13 Thread Dmitriy Setrakyan
This looks a bit confusing. Why is it not enough to have this check: e.getCause().getCause() instanceof TransactionDeadlockException ? On Tue, Jun 13, 2017 at 4:40 PM, Denis Magda wrote: > Pardon me, copy pasted the catch block twice. This how the block looked > like in Ignite 1.x > > catch (C

Re: Transaction Deadlock Detection exception is not wrapped by the timeout exception

2017-06-13 Thread Denis Magda
Pardon me, copy pasted the catch block twice. This how the block looked like in Ignite 1.x catch (CacheException e) { if (e.getCause() instanceof TransactionTimeoutException && e.getCause().getCause() instanceof TransactionDeadlockException) System.out.println(e.g

Transaction Deadlock Detection exception is not wrapped by the timeout exception

2017-06-13 Thread Denis Magda
Andrey Gura, Igniters, If to refer to our documentation [1], this is how we need to catch the deadlock detection exception: catch (CacheException e) { if (e.getCause() instanceof IgniteCheckedException && e.getCause().getCause() instanceof TransactionDeadlockException)