Re: .Net client call tx,close in other thread

2017-07-26 Thread Николай Ижиков
Hello, Semyon. Thank you for your clarification. I removed check for threadId from my pull request. 2017-07-26 16:52 GMT+03:00 Semyon Boikov : > Hi, > > Currently tx is AutoCloseable and 'close' should be always called by > interface contract. > > Currently Transaction is single-threaded and sho

Re: .Net client call tx,close in other thread

2017-07-26 Thread Semyon Boikov
Hi, Currently tx is AutoCloseable and 'close' should be always called by interface contract. Currently Transaction is single-threaded and should not be used by multiple concurrent threads. But if you call commitAsync and then call 'close' from commitAsync listener this is correct usage and we sho

Re: .Net client call tx,close in other thread

2017-07-26 Thread Anton Vinogradov
close() for Transaction is a method inherited from AutoCloseable. It used to rollback tx in case it was not rollbacked or commited inside try section here's the code of close: @Override public void close() throws IgniteCheckedException { TransactionState state = state(); if (stat

Re: .Net client call tx,close in other thread

2017-07-26 Thread Pavel Tupitsyn
We still need to confirm the correct behavior: 1) Should it be possible to call Transaction.close() from a different thread? 2) Do we need to call close() after commit()? What about commitAsync()? What if exception happens? Can someone clarify this? On Tue, Jul 25, 2017 at 11:08 PM, Nikolay Izhik

Re: .Net client call tx,close in other thread

2017-07-25 Thread Nikolay Izhikov
Pavel. You will fix .Net client so I don't need to change threadId checks in my pull request. Is that correct? 25.07.2017 20:19, Pavel Tupitsyn пишет: Further investigation shows that platform code performs unnecessary close() calls for committed & rolled back transactions (sync and async). T

Re: .Net client call tx,close in other thread

2017-07-25 Thread Pavel Tupitsyn
Further investigation shows that platform code performs unnecessary close() calls for committed & rolled back transactions (sync and async). Ticket filed: https://issues.apache.org/jira/browse/IGNITE-5834 I'll fix this tomorrow and it should resolve your issue. Thanks, Pavel On Tue, Jul 25, 2017

Re: .Net client call tx,close in other thread

2017-07-25 Thread Pavel Tupitsyn
Anyway, disallowing close() from another thread would be a breaking change, we can't do that. On Tue, Jul 25, 2017 at 7:36 PM, Pavel Tupitsyn wrote: > I've reproduced the issue, it happens because in .NET we auto-close the > transaction > on commit/rollback. This involves two things: > * release

Re: .Net client call tx,close in other thread

2017-07-25 Thread Pavel Tupitsyn
I've reproduced the issue, it happens because in .NET we auto-close the transaction on commit/rollback. This involves two things: * release .NET reference to Java object * call Transaction.close() With sync methods this is trivial, but with commitAsync/rollbackAsync we have to call close() in Igni

Re: .Net client call tx,close in other thread

2017-07-25 Thread Николай Ижиков
Hi, Pavel You can check my pull request. https://github.com/apache/ignite/pull/2334 For now I return checks so it has to fail on .Net test suite 2017-07-25 17:16 GMT+03:00 Pavel Tupitsyn : > Hi Николай, > > .NET test in question (TestTxStateAndExceptions) does not do any > multithreading, > ev

Re: .Net client call tx,close in other thread

2017-07-25 Thread Pavel Tupitsyn
Hi Николай, .NET test in question (TestTxStateAndExceptions) does not do any multithreading, everything is called from a single thread. I see that the latest .NET run of your pull request on TeamCity finished successfully: http://ci.ignite.apache.org/viewLog.html?buildId=738277 Do you still have

.Net client call tx,close in other thread

2017-07-25 Thread Николай Ижиков
Hello, Igniters. I working on issue https://issues.apache.org/jira/browse/IGNITE-5712 I found that .Net client perform transaction operation(`tx.close()`) in thread that not owns transaction. So I can't include checks for threadId in my pull request. Is it a bug or a desirable behabiour? With m