[
https://issues.apache.org/jira/browse/IGNITE-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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)