[jbossts-issues] [JBoss JIRA] (JBTM-3218) Transaction statistics for read-only + last record may go wrong

Ondrej Chaloupka (Jira) issues at jboss.org
Wed Nov 13 10:05:00 EST 2019


Ondrej Chaloupka created JBTM-3218:
--------------------------------------

             Summary: Transaction statistics for read-only + last record may go wrong
                 Key: JBTM-3218
                 URL: https://issues.jboss.org/browse/JBTM-3218
             Project: JBoss Transaction Manager
          Issue Type: Bug
          Components: JTA
    Affects Versions: 5.10.0.Final
            Reporter: Ondrej Chaloupka
            Assignee: Ondrej Chaloupka


As discussed at https://issues.jboss.org/browse/WFTC-78?focusedCommentId=13808486#comment-13808486 there was seen a wrong statistics being reported at a remote ejb calls for WFLY. The number of committed transactions went bigger than the number of all processed transactions.

This happens when the transaction consists of {{XAResource}} which announces to be read only during {{prepare}} call and with the second resource which is {{LastResource}} (https://github.com/jbosstm/jboss-transaction-spi/blob/master/src/main/java/org/jboss/tm/LastResource.java).
In such case the {{onePhaseCommit}} could be called during the {{BasicAction#prepare}} call (https://github.com/jbosstm/narayana/blob/5.10.0.Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java#L2170).
In such case the statistics of committed transactions are increased during the {{onePhaseCommit}} method call and then during the {{phase2Commit}} at {{BasicAction#End}} call (https://github.com/jbosstm/narayana/blob/5.10.0.Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/coordinator/BasicAction.java#L1529).



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jbossts-issues mailing list