[
https://issues.jboss.org/browse/JBTM-2124?page=com.atlassian.jira.plugin....
]
Ondra Chaloupka edited comment on JBTM-2124 at 12/6/17 1:38 AM:
----------------------------------------------------------------
Discussion at the
https://developer.jboss.org/message/971613 gives more details about
needs for this fix. My conversation with Jonathan during F2F gives me a bit more details
about what his proposal meant
{quote
... ensure the node name is getting into the Xid (it probably already is), ensure the
existing name filter can read it (it probably can), add ownership filter(s) as
necessary...
{quote}
What I was not sure what is the ownership filter - that's mean filter which defines if
the transaction is not inflight one. The order of {{XAResourceOrphanFilter}} (orphan
filters are lauched by XARecoveryModule) to veto rollback (in case) should be similar what
JTA does in way (example from JTA): NodeNameXAResourceOrphanFilter (was transaction
created by me?), JTATransactionLogXAResourceOrphanFilter (is not this transaction
subordinate?), JTAActionStatusServiceXAResourceOrphanFilter (is not this transaction
in-fligth?)
The picture
https://issues.jboss.org/secure/attachment/12428637/jonathan-picturing-tr...
shows the test scenario which needs to be considered which is about writing parent and
child to the same database. Both are of the same transaction but each of the Xid record
belongs to different server. The Xid of {{#2}} has to be resolved by {{Child}}. If
{{Parent}} tries to resolve it then it would vote to rollback as it does have no record in
parent's log store (the record was created by child).
was (Author: ochaloup):
Discussion at the
https://developer.jboss.org/message/971613 gives more details about
needs for this fix. My conversation with Jonathan during F2F gives me a bit more details
about what his proposal meant
{quote
... ensure the node name is getting into the Xid (it probably already is), ensure the
existing name filter can read it (it probably can), add ownership filter(s) as
necessary...
{quote}
What I was not sure what is the ownership filter - that's mean filter which defines if
the transaction is not inflight one. The order of {{XAResourceOrphanFilter}} to veto
rollback (in case) should be similar what JTA does in way (example from JTA):
NodeNameXAResourceOrphanFilter (was transaction created by me?),
JTATransactionLogXAResourceOrphanFilter (is not this transaction subordinate?),
JTAActionStatusServiceXAResourceOrphanFilter (is not this transaction in-fligth?)
The picture
https://issues.jboss.org/secure/attachment/12428637/jonathan-picturing-tr...
shows the test scenario which needs to be considered which is about writing parent and
child to the same database. Both are of the same transaction but each of the Xid record
belongs to different server. The Xid of {{#2}} has to be resolved by {{Child}}. If
{{Parent}} tries to resolve it then it would vote to rollback as it does have no record in
parent's log store (the record was created by child).
Add orphan detection for JTS interposition mode
-----------------------------------------------
Key: JBTM-2124
URL:
https://issues.jboss.org/browse/JBTM-2124
Project: JBoss Transaction Manager
Issue Type: Feature Request
Components: Recovery
Affects Versions: 4.17.17
Reporter: Ondra Chaloupka
Assignee: Ondra Chaloupka
Fix For: 5.later
Attachments:
jonathan-picturing-trouble-of-subordinate-txn-for-jts-orphan-detection.jpg
Currently orphan detection is supported for JTA, not for JTS. Please, add the suport for
JTS as well.
The following scenario for JTS causes that the orphan is left in the transaction log
store and the prepared resource could held the lock till the time that it's timeouted
on the side of the database/jms.
The program flow is following (test run on EAP 6)
enlisting jms xaresource to transaction
sending msg to queue
enlisting xa test resource
preparing jms xaresource
preparing xa test resource
crash JVM at the end of the test XAResource.prepare()
restart app server and recovery is run
During recovery the jms resource is processed correctly because TM found some info in its
jts logs. But such info was not saved for test xa resource. The test xa is not rollback.
More info and discussion could be found at:
https://bugzilla.redhat.com/show_bug.cgi?id=1064170
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)