]
Ivan Straka edited comment on WFLY-12317 at 8/19/19 10:38 AM:
--------------------------------------------------------------
Hi [~bmaxwell],
we might need your insight here.
What is going on? Change node-identifier model attribute definition from reload required
to JVM restart.
The problem is this will get to 7.3.0 eventually. Strictly speaking such change in API can
not be part of minor release.
Moreover following scenario is possible for a customer
# start a server
# change node-identifier
# reload
The change takes no effect here - it is also the failing test scenario in this Jira
However there are arguments to support the change:
* Narayana expects node-identifier to require JVM restart after it is changed - might be
considered as a bug in model
* It is said nowhere that reload is required when node-identifier (no documentation,...) -
info is available only in model description
WDYT?
was (Author: istraka):
Hi [~bmaxwell],
we might need your insight here.
What is going on? Change node-identifier model attribute definition from reload required
to JVM restart.
The problem is this will get to 7.3.0 eventually. Strictly speaking such change in API can
not be part of minor release.
Moreover following scenario is possible for a customer
# start a server
# change node-identifier
# reload
The change takes no effect here - it is also the failing test scenario in this Jira
However there are arguments to support the change:
* Narayana is expecting node-identifier to require JVM restart after change
* It is said nowhere that reload is required when node-identifier (no documentation,...) -
info is available only in model description
WDYT?
Using JTA transaction's node_name attribute is set to an old
value after node-identifier is changed
---------------------------------------------------------------------------------------------------
Key: WFLY-12317
URL:
https://issues.jboss.org/browse/WFLY-12317
Project: WildFly
Issue Type: Bug
Components: Transactions
Affects Versions: 17.0.0.Final
Reporter: Ivan Straka
Assignee: Ondrej Chaloupka
Priority: Critical
Attachments:
server1_TxDifferentNodeCrashRecoveryTestCase_prepareHalt_jta_server.log,
server2_TxDifferentNodeCrashRecoveryTestCase_prepareHalt_jta_server.log
We have following test scenario (3 servers) that fails:
# node-identifier of server1, 2 & 3 is set to 'vkcd', 'FdOu' and
'GocW' (ts.jbosstsX.node.identifier property)
# server2 is started, node-identifier is set to txdifferentnodeid and server2 is
stopped
# server1 is started, node-identifier is set to txdifferentnodeid and server1 is
reloaded
# server3 is running
# client call an EJB bean (where a transaction is started) on the server1
# the EJB sends JMS message to the server3 (broker)
# the EJB enlists dummy xa resource
# during 2PC the Server1 is halted when prepare on dummy xa resource is invoked
# we move server1 object store directory to the server2
# server2 is started
# the server2 is expected to rollback whole transaction
Transaction is unfinished because server2 has not performed rollback.
{code:java}
prepareHalt(org.jboss.as.test.jbossts.crashrec.differentnode.test.TxDifferentNodeCrashRecoveryTestCase)
Time elapsed: 810.354 sec <<< FAILURE!
java.lang.AssertionError: Some unfinished xids on messaging server - expected 0 but was
1
at org.junit.Assert.fail(Assert.java:88)
at
org.jboss.as.test.jbossts.crashrec.differentnode.test.TxDifferentNodeCrashRecoveryTestCase.checkAfterTestExecution(TxDifferentNodeCrashRecoveryTestCase.java:792)
at
org.jboss.as.test.jbossts.crashrec.differentnode.test.TxDifferentNodeCrashRecoveryTestCase.prepareHalt(TxDifferentNodeCrashRecoveryTestCase.java:565)
{code}
In the beginning servers' node-identifier are set to some value (lets say A,B,C).
Before test execution node-identifier of server1 and server2 is set to the same value,
let's say X.
I see in logs that the transaction's node_name is set to the old value (vkcd vs
txdifferentnodeid in the example below) on server1. Thus the server2 has not performed
rollback.
See node_name
Server1:
{code:java}
2019-07-22 17:40:54,616 DEBUG [com.arjuna.ats.jta] (MSC service thread 1-5) Setting up
node identifiers '[txdifferentnodeid]' for which recovery will be performed
{code}
{code:java}
2019-07-22 17:41:11,931 TRACE [com.arjuna.ats.jta] (default task-2)
XAResourceRecord.XAResourceRecord ( < formatId=131077, gtrid_length=32,
bqual_length=36, tx_uid=0:ffff0a2804ed:26165251:5d35d902:3c, node_name=vkcd,
branch_uid=0:ffff0a2804ed:26165251:5d35d902:46, subordinatenodename=null,
eis_name=java:/JmsXA NodeId:05b492ae-ac97-11e9-a446-2016b912eaa8 >,
XAResourceWrapperImpl@4158c7ec[xaResource=org.jboss.activemq.artemis.wildfly.integration.WildFlyActiveMQXAResourceWrapper(a)4a21a45f
pad=false overrideRmValue=null productName=ActiveMQ Artemis productVersion=2.0
jndiName=java:/JmsXA NodeId:05b492ae-ac97-11e9-a446-2016b912eaa8] ), record
id=0:ffff0a2804ed:26165251:5d35d902:47
{code}
Server2:
{code:java}
2019-07-22 17:41:15,397 DEBUG [com.arjuna.ats.jta] (MSC service thread 1-3) Setting up
node identifiers '[txdifferentnodeid]' for which recovery will be performed
{code}
{code:java}
2019-07-22 17:43:56,062 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) node name of <
formatId=131077, gtrid_length=32, bqual_length=36,
tx_uid=0:ffff0a2804ed:26165251:5d35d902:3c, node_name=vkcd,
branch_uid=0:ffff0a2804ed:26165251:5d35d902:46, subordinatenodename=null, eis_name=forgot
eis name for: 1 > is vkcd
2019-07-22 17:43:56,062 DEBUG [com.arjuna.ats.jta] (Periodic Recovery)
XAResourceOrphanFilter
com.arjuna.ats.internal.jta.recovery.arjunacore.JTANodeNameXAResourceOrphanFilter voted
ABSTAIN
{code}
*When does the scenario pass*
When I run the TS with
{code:java}
-Dts.jbossts1.node.identifier=txdifferentnodeid
-Dts.jbossts2.node.identifier=txdifferentnodeid
{code}
the test passes (old and new node-identifier on both servers are same)
When step 3 slightly differs:
When restart is performed instead of reload op.
Server1 is reloaded. If it is restarted, node name is set correctly to txdifferentnodeid
*tldr;*
The problem is that server1 set TX node name to old value after node identifier is
changed and server is reloaded. If the server is restarted, everything is OK.