Bug 1837496 - [GSS](6.4.z) EJB XA Tx issue EAP 7.x <-> EAP 6.4 - XidTransactionBeforeCompletionTask: don't throw an exception when subordinate transaction is not present
Summary: [GSS](6.4.z) EJB XA Tx issue EAP 7.x <-> EAP 6.4 - XidTransactionBeforeComple...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.4.22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: EAP 6.4.23
Assignee: Romain Pelisse
QA Contact: Peter Mackay
URL:
Whiteboard:
Depends On:
Blocks: eap6423-payload 1837532
TreeView+ depends on / blocked
 
Reported: 2020-05-19 14:47 UTC by Brad Maxwell
Modified: 2025-02-10 04:00 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 04:00:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Brad Maxwell 2020-05-19 14:47:44 UTC
In case of transactional invocations spanning both EAP6 and EAP7 nodes, EAP7 server may send beforeCompletion message to the master transaction - this should be ignored.

The issue seems to be caused by change in the way in which the old and the new client behaviour regarding various protocol messages, specifically those dealing with imported transaction. The simple scenario with which I was able to reproduce the errors from the scenarios above are...
node1 -> node2 -> node1
... in both EAP7->EAP6->EAP7 and EAP6->EAP7->EAP6 combinations.

If both nodes are working on the same EAP version it is as follows:

EAP6.4:
1. node 1 (starts top transaction A)
2. node 2 (starts subordinate transaction B)
3. node 1 (continues operation in transaction A)
4. node 1 sends commit (no beforeCompletion call) to node 2 (A->B)
5. node 2 sends commit (no beforeCompletion call) to node 1 (B->A -> this commit is ignored (https://github.com/jbossas/jboss-eap/blob/6.4.x/ejb3/src/main/java/org/jboss/as/ejb3/remote/protocol/versionone/XidTransactionCommitTask.java#L68)

EAP7.2:
1. node 1 (starts top transaction A)
2. node 2 (starts subordinate transaction B (node2 learns that there is a master transaction on node1 (https://github.com/wildfly/wildfly-transaction-client/blob/master/src/main/java/org/wildfly/transaction/client/OutflowHandleManager.java#L130))
3. node 1 (transaction continues in A)
4. node 1 sends beforeCompletion and commit to node 2 (A->B)
5. B committed (node2 does not send beforeCompletion nor commit to node 1)
6. A committed

EAP7.2 -> EAP6.4 -> EAP7.2
1. node 1 (starts top transaction A)
2. node 2 (starts subordinate transaction B (node1 doesn't know that there is master on node2)
3. node 1 (transaction continues in A)
4. node 1 sends commit to node 2 (A->B)
5. node 2 sends commit to node 1 (B->A) (FAILURE - NOT SUBORDINATE (https://github.com/wildfly/wildfly-transaction-client/blob/master/src/main/java/org/wildfly/transaction/client/provider/jboss/JBossLocalTransactionProvider.java#L495))

This scenario can be worked around by logging warning message instead of throwing an error (https://github.com/wildfly/wildfly-transaction-client/blob/master/src/main/java/org/wildfly/transaction/client/provider/jboss/JBossLocalTransactionProvider.java#L495) - the transactions are finished correctly. I have create the PR to deal with it: https://github.com/wildfly/wildfly-transaction-client/pull/105.

EAP6.4 -> EAP7.2 -> EAP6.4
1. node 1 (starts top transaction A)
2. node 2 (starts subordinate B (node 2 can't learn that this is not subordinate in this version of the protocol))
3. node 1 (continues operation in A)
3. node 1 sends commit to node 2 (A->B)
4. node 2 sends beforeCompletion to node 1 (FAILURE NOT SUBORDINATE (https://github.com/jbossas/jboss-eap/blob/6.4.x/ejb3/src/main/java/org/jboss/as/ejb3/remote/protocol/versionone/XidTransactionBeforeCompletionTask.java#L46))

This scenario can again be worked around by warning message instead of throwing an error (in the same was as in XidTransactionCommitTask). I have created a PR to deal with it: https://github.com/jbossas/jboss-eap/pull/3145

After those PRs are applied all scenarios from the reproducer seem to work correctly. Michael Musgrove Ondrej Chaloupka could you please review whether this analysis is correct and whether you consider those above fixes as correct as well?

As a side note, there are some marshalling ClassNotFoundExceptions (f.e. EjbIdentifier which indeed is not present in EAP6.4 yet). Those disseapear if the errors above are eliminated so this is not a main problem but they may need some investigation at some point.

Comment 6 Peter Mackay 2020-06-30 12:08:28 UTC
Verified with EAP 6.4.23.CP.CR2

Comment 7 Red Hat Bugzilla 2025-02-10 04:00:13 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.