[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16377292#comment-16377292 ] ASF GitHub Bot commented on IGNITE-4648: Github user SomeFire closed the pull request at: https://github.com/apache/ignite/pull/1876 > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.3 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16096244#comment-16096244 ] Anton Vinogradov commented on IGNITE-4648: -- Currently waiting for TeamCity results. > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16094311#comment-16094311 ] Ryabov Dmitrii commented on IGNITE-4648: [~avinogradov], [~yzhdanov], [~ptupitsyn], I added boolean flag to {{prepare()}} method. [JTA|http://ci.ignite.apache.org/viewLog.html?buildId=733943=Ignite20Tests_IgniteJta=buildResultsDiv] and [.NET|http://ci.ignite.apache.org/viewLog.html?buildId=733942=buildResultsDiv=Ignite20Tests_RunAllNet] tests are successfully completed. > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16091715#comment-16091715 ] Anton Vinogradov commented on IGNITE-4648: -- [~SomeFire], Discussed with [~yzhdanov] at separate thread and decided to add {{awaitAsyncOps}} boolean flag to {{prepare()}} signature. It should be true for all current invokes. > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16091625#comment-16091625 ] Ryabov Dmitrii commented on IGNITE-4648: [~yzhdanov], do we really need separate method for awaiting? > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16091621#comment-16091621 ] Yakov Zhdanov commented on IGNITE-4648: --- [~SomeFire] it seems you altered my code. Please put this method back: {noformat} /** * @throws IgniteCheckedException If failed. */ public final void awaitLastFutureAndPrepare() throws IgniteCheckedException { txState().awaitLastFuture(cctx); prepare(); } {noformat} And restore its invocations. > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16091578#comment-16091578 ] Anton Vinogradov commented on IGNITE-4648: -- [~SomeFire], Looks good to me. [~yzhdanov], Please make final check. > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16087061#comment-16087061 ] Ryabov Dmitrii commented on IGNITE-4648: [~yzhdanov], [~ptupitsyn], test results are [here|http://ci.ignite.apache.org/viewLog.html?buildId=723892=buildResultsDiv=Ignite20Tests_RunAll]. > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16085771#comment-16085771 ] Pavel Tupitsyn commented on IGNITE-4648: [~yzhdanov] I've updated .NET tests to check async operations within {{TransactionScope}}. These tests hang or fail in master, but work fine in this branch. > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16085681#comment-16085681 ] Ryabov Dmitrii commented on IGNITE-4648: [~yzhdanov], TC tests are in progress (I let you know results when they finish), but I though test method for this ticket must have separate "prepare" call. I created separate ticket for test coverage - [IGNITE-5748 Extend JTA test coverage|https://issues.apache.org/jira/browse/IGNITE-5748]. > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16085532#comment-16085532 ] Yakov Zhdanov commented on IGNITE-4648: --- [~SomeFire] [~ptupitsyn] Guys, I have pushed my changes to origin/ignite-4648 Dmitry, please review my changes and rerun TC for them. Please let us know about TC results here. I would also ask you to extend JTA test coverage (you can file in another ticket). The goal is to have every method of CacheJtaResource called inside your tests. Please add tests that will enlist fake XA resources to transaction (to the one enlisted for proper cache tx). You can use this snippet: {noformat} jotm.getTransactionManager().getTransaction().enlistResource(new XAResource() {.. }); {noformat} We need to do this because with only one resource transaction manager calls commit() without calling prepare(). Therefore, a lot of code is not covered with tests. Please add them and add invocations counters and asserts for them. Pavel, please see my changes to CacheJtaResource and change PlatformTransactions accordingly. I want you to add more tests for platform tx that would at least check async operations that should have been failed before changes to this ticket. > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.2 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16072178#comment-16072178 ] Ryabov Dmitrii commented on IGNITE-4648: [~yzhdanov], I added new method to check prepare. Can you look it? > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.1 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16014143#comment-16014143 ] Yakov Zhdanov commented on IGNITE-4648: --- Dmitry, can you please add a test that fails before the fix and passes after? In Ignite we try to react on a problem reported with a test that fails. Then we fix the test. Please look at this test - org.apache.ignite.internal.processors.cache.AbstractCacheJtaSelfTest You can add new test method and do some putAsync() for keys that are currently locked by pessimistic transactions in parallel threads. Then you commit JTA transaction and then commit cache transaction in parallel thread and then assert the results. Thanks! Yakov > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.1 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (IGNITE-4648) IgniteInternalTx.prepare() does not wait for async operations to complete
[ https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15984815#comment-15984815 ] ASF GitHub Bot commented on IGNITE-4648: GitHub user SomeFire opened a pull request: https://github.com/apache/ignite/pull/1876 IGNITE-4648 You can merge this pull request into a Git repository by running: $ git pull https://github.com/SomeFire/ignite ignite-4648 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/1876.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1876 commit 400dca03c510730d867807a734195ff4a6bae77a Author: Dmitrii RyabovDate: 2017-04-26T13:28:18Z tx.txState().awaitLastFut() inserted into prepareTx() > IgniteInternalTx.prepare() does not wait for async operations to complete > - > > Key: IGNITE-4648 > URL: https://issues.apache.org/jira/browse/IGNITE-4648 > Project: Ignite > Issue Type: Bug > Components: cache >Affects Versions: 1.7 >Reporter: Pavel Tupitsyn >Assignee: Ryabov Dmitrii >Priority: Minor > Fix For: 2.1 > > > {{commit}} and {{rollback}} wait for async operations by calling > {{tx.txState().awaitLastFut();}} (see {{GridCacheSharedContext}}). > There is no such thing in {{IgniteInternalTx.prepare()}} implementations. > Since {{prepare}} is an internal method, this is not an issue mostly, except > for two things: > * JTA. {{CacheJtaResource}} calls {{prepare()}} explicitly. > * .NET {{TransactionScope}} API. Same thing as JTA, basically. > {{PlatformTransactions}} call {{prepare()}} as well. > As a result, if user starts an async operation within JTA transaction and > then completes the tx, undefined behavior is possible. -- This message was sent by Atlassian JIRA (v6.3.15#6346)