[JBoss JIRA] (JBTM-1866) HeuristicMixedException reported to client, although backends don't support heuristic completion
by Christian von Kutzleben (JIRA)
[ https://issues.jboss.org/browse/JBTM-1866?page=com.atlassian.jira.plugin.... ]
Christian von Kutzleben commented on JBTM-1866:
-----------------------------------------------
I'll try to get hold of that books, however it does not follow from the spec directly
and does also contradict 2PC as described by Bernstein/Hadzilacos/Goodman.
Also I did not say, that the transaction _is_ committed, it is only supposed to be committed.
In normal 2PC, the decision regarding the transaction outcome is supposed to be final and
persisted after the prepare phase.
> HeuristicMixedException reported to client, although backends don't support heuristic completion
> ------------------------------------------------------------------------------------------------
>
> Key: JBTM-1866
> URL: https://issues.jboss.org/browse/JBTM-1866
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> this bug is related to:
> https://issues.jboss.org/browse/JBTM-1865
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, the other
> issue is filed as JBTM-1865
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the second database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> The first branch was successfully committed (as it should be spec.)
> But now things go awry:
> 1. The client receives a HeuristicMixedException, although the backend
> does not support heuristic completion at all, i.e. there should be no Heuristic* exception be thrown
> The correct behavior is, to report the transaction as success to the client, commit all other branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1866) HeuristicMixedException reported to client, although backends don't support heuristic completion
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-1866?page=com.atlassian.jira.plugin.... ]
Mark Little commented on JBTM-1866:
-----------------------------------
Christian, the transaction is NOT committed just because resources agree to prepare. Please read the following:
XA, JTA, OTS, books by Jim Gray, Eric Newcomer and one by myself, Greg Pavlik and Jon Maron. And/or check out the blog.
Any further discussions should be taken to the forums, because JIRA is not a good substitute for a discussion forum.
> HeuristicMixedException reported to client, although backends don't support heuristic completion
> ------------------------------------------------------------------------------------------------
>
> Key: JBTM-1866
> URL: https://issues.jboss.org/browse/JBTM-1866
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> this bug is related to:
> https://issues.jboss.org/browse/JBTM-1865
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, the other
> issue is filed as JBTM-1865
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the second database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> The first branch was successfully committed (as it should be spec.)
> But now things go awry:
> 1. The client receives a HeuristicMixedException, although the backend
> does not support heuristic completion at all, i.e. there should be no Heuristic* exception be thrown
> The correct behavior is, to report the transaction as success to the client, commit all other branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1866) HeuristicMixedException reported to client, although backends don't support heuristic completion
by Christian von Kutzleben (JIRA)
[ https://issues.jboss.org/browse/JBTM-1866?page=com.atlassian.jira.plugin.... ]
Christian von Kutzleben commented on JBTM-1866:
-----------------------------------------------
Could you please point out, where in the XA spec that is said?
That's a normal failure scenario in the 2PC, and the transaction is supposed to be committed after the prepare phase.
If any resource fails during commit(), it is up to the recovery module, to eventually bring the transaction
to a consistent state.
> HeuristicMixedException reported to client, although backends don't support heuristic completion
> ------------------------------------------------------------------------------------------------
>
> Key: JBTM-1866
> URL: https://issues.jboss.org/browse/JBTM-1866
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> this bug is related to:
> https://issues.jboss.org/browse/JBTM-1865
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, the other
> issue is filed as JBTM-1865
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the second database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> The first branch was successfully committed (as it should be spec.)
> But now things go awry:
> 1. The client receives a HeuristicMixedException, although the backend
> does not support heuristic completion at all, i.e. there should be no Heuristic* exception be thrown
> The correct behavior is, to report the transaction as success to the client, commit all other branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1865) Transaction reported to be rolled back, although committed with one participant
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-1865?page=com.atlassian.jira.plugin.... ]
Mark Little commented on JBTM-1865:
-----------------------------------
"It's 2PC and the XAResource has already guaranteed to commit the transaction." If we lived in the world of the strict 2PC protocol then you would be right. However, no transaction manager standard or implementation since the 1960's has been able to live in that world, since strict 2PC is a blocking protocol. As a result, heuristics were introduced and any resource that has prepared can still go back on that choice between prepare and being told what to do by the coordinator. The only thing it has to do is remember this autonomous decision so it can report it to the coordinator eventually.
This is all documented at length in various standards and books. We also have quite a few articles and videos on the JBoss.org site as well as in the JBoss transactions team's blog. I recommend you check them out if you need further clarification.
> Transaction reported to be rolled back, although committed with one participant
> -------------------------------------------------------------------------------
>
> Key: JBTM-1865
> URL: https://issues.jboss.org/browse/JBTM-1865
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, I'll file the second issue shortly and update this ticket accordingly.
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the first database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> But now things go awry:
> 1. There is a XAResource.rollback() issued to the second XAResource.
> 2. The client receives a EJBTransactionRolledbackException, although
> one branch has been completed.
> Note, that our database does not support heuristical completion of a branch at all, i.e. there should be no Heuristic* exception be thrown either.
> The correct behavior is, to report the transaction as success to the client, commit all branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1866) HeuristicMixedException reported to client, although backends don't support heuristic completion
by Tom Jenkinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-1866?page=com.atlassian.jira.plugin.... ]
Tom Jenkinson resolved JBTM-1866.
---------------------------------
Resolution: Rejected
Hi Christian,
I have rejected this there is no bug here (except in the resource manager where it has reported a rollback when it committed) as one resource manager reported a rollback out of commit and hence caused a heuristic outcome of the encompassing transaction.
Effectively you have one resource that committed and one that rolled back (XA_RB*) and so that is a heuristic outcome.
Tom
> HeuristicMixedException reported to client, although backends don't support heuristic completion
> ------------------------------------------------------------------------------------------------
>
> Key: JBTM-1866
> URL: https://issues.jboss.org/browse/JBTM-1866
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> this bug is related to:
> https://issues.jboss.org/browse/JBTM-1865
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, the other
> issue is filed as JBTM-1865
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the second database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> The first branch was successfully committed (as it should be spec.)
> But now things go awry:
> 1. The client receives a HeuristicMixedException, although the backend
> does not support heuristic completion at all, i.e. there should be no Heuristic* exception be thrown
> The correct behavior is, to report the transaction as success to the client, commit all other branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1866) HeuristicMixedException reported to client, although backends don't support heuristic completion
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-1866?page=com.atlassian.jira.plugin.... ]
Mark Little commented on JBTM-1866:
-----------------------------------
One of your RMs has committed and one of them has rolled back. That's a heuristic. It would be wrong for any transaction manager to ignore that situation and assume that somehow the individual RMs will sort out this mess themselves. Resolving heuristics is typically a manual process because it requires semantic information about the transaction (unit of work) that was in play when it happened.
> HeuristicMixedException reported to client, although backends don't support heuristic completion
> ------------------------------------------------------------------------------------------------
>
> Key: JBTM-1866
> URL: https://issues.jboss.org/browse/JBTM-1866
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> this bug is related to:
> https://issues.jboss.org/browse/JBTM-1865
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, the other
> issue is filed as JBTM-1865
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the second database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> The first branch was successfully committed (as it should be spec.)
> But now things go awry:
> 1. The client receives a HeuristicMixedException, although the backend
> does not support heuristic completion at all, i.e. there should be no Heuristic* exception be thrown
> The correct behavior is, to report the transaction as success to the client, commit all other branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1865) Transaction reported to be rolled back, although committed with one participant
by Tom Jenkinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-1865?page=com.atlassian.jira.plugin.... ]
Tom Jenkinson resolved JBTM-1865.
---------------------------------
Resolution: Rejected
Hi Christian,
Thanks for the interest in Narayana. As Mark has identified, your resource has marked itself as rolled back and as it was the first resource in the intentions list and the transaction manager was therefore able to guarantee an atomic outcome, the transaction was rolled back.
If you have further questions about the operating behavior of Narayana may I please ask you to raise a discussion in our forum: https://community.jboss.org/en/jbosstm/?view=discussions
Tom
> Transaction reported to be rolled back, although committed with one participant
> -------------------------------------------------------------------------------
>
> Key: JBTM-1865
> URL: https://issues.jboss.org/browse/JBTM-1865
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, I'll file the second issue shortly and update this ticket accordingly.
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the first database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> But now things go awry:
> 1. There is a XAResource.rollback() issued to the second XAResource.
> 2. The client receives a EJBTransactionRolledbackException, although
> one branch has been completed.
> Note, that our database does not support heuristical completion of a branch at all, i.e. there should be no Heuristic* exception be thrown either.
> The correct behavior is, to report the transaction as success to the client, commit all branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1865) Transaction reported to be rolled back, although committed with one participant
by Mark Little (JIRA)
[ https://issues.jboss.org/browse/JBTM-1865?page=com.atlassian.jira.plugin.... ]
Mark Little commented on JBTM-1865:
-----------------------------------
No, we're completely right. In this case there is not necessarily a heuristic if the RBCOMMFAIL comes from the first resource: we will attempt to call rollback on the subsequent RMs since the first RM rolled back. If we can succeed in doing so then the transaction is rolled back. If one or more of the subsequent RMs fails to roll back then there is a heuristic situation. We will always try very hard to avoid heuristics.
> Transaction reported to be rolled back, although committed with one participant
> -------------------------------------------------------------------------------
>
> Key: JBTM-1865
> URL: https://issues.jboss.org/browse/JBTM-1865
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, I'll file the second issue shortly and update this ticket accordingly.
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the first database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> But now things go awry:
> 1. There is a XAResource.rollback() issued to the second XAResource.
> 2. The client receives a EJBTransactionRolledbackException, although
> one branch has been completed.
> Note, that our database does not support heuristical completion of a branch at all, i.e. there should be no Heuristic* exception be thrown either.
> The correct behavior is, to report the transaction as success to the client, commit all branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1866) HeuristicMixedException reported to client, although backends don't support heuristic completion
by Christian von Kutzleben (JIRA)
[ https://issues.jboss.org/browse/JBTM-1866?page=com.atlassian.jira.plugin.... ]
Christian von Kutzleben commented on JBTM-1866:
-----------------------------------------------
see my comments on JBTM-1865; also I will change the error code and get back to this ticket.
> (please refer to the relevant specification documents to see what I mean).
Please be more specific, the spec says, heuristical completion can by done by the RM, not the TM,
and our RM does not do so.
> HeuristicMixedException reported to client, although backends don't support heuristic completion
> ------------------------------------------------------------------------------------------------
>
> Key: JBTM-1866
> URL: https://issues.jboss.org/browse/JBTM-1866
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> this bug is related to:
> https://issues.jboss.org/browse/JBTM-1865
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, the other
> issue is filed as JBTM-1865
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the second database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> The first branch was successfully committed (as it should be spec.)
> But now things go awry:
> 1. The client receives a HeuristicMixedException, although the backend
> does not support heuristic completion at all, i.e. there should be no Heuristic* exception be thrown
> The correct behavior is, to report the transaction as success to the client, commit all other branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1865) Transaction reported to be rolled back, although committed with one participant
by Christian von Kutzleben (JIRA)
[ https://issues.jboss.org/browse/JBTM-1865?page=com.atlassian.jira.plugin.... ]
Christian von Kutzleben commented on JBTM-1865:
-----------------------------------------------
on a second thought, you're only partially right. RBCOMMFAIL is the wrong error code, however, JBoss should
not handle any RB* except maybe heuristical ones specially as result of XAResource.commit()
It's 2PC and the XAResource has already guaranteed to commit the transaction.
> Transaction reported to be rolled back, although committed with one participant
> -------------------------------------------------------------------------------
>
> Key: JBTM-1865
> URL: https://issues.jboss.org/browse/JBTM-1865
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.17.4
> Reporter: Christian von Kutzleben
> Assignee: Tom Jenkinson
>
> While testing recovery and transaction failures we came across
> two related issues, the test scenario is almost the same, I'll file the second issue shortly and update this ticket accordingly.
> Scenario:
> 2 enlisted XAResources (one for each database used by the test),
> The prepare phase is successful.
> We crash the first database server during the XAResource.commit invocation,
> _after_ it has committed it's branch, right before the control flow would return to the XAResource (which as a result throws a XAException.XA_RBCOMMFAIL).
> The TM can not know at this point in time, whether the database successfully committed the transaction or not. In this particular case, all changes have been committed.
> By definition of the 2PC protocol, the transaction should be considered as "to be committed", because the prepare phase has ended successfully.
> But now things go awry:
> 1. There is a XAResource.rollback() issued to the second XAResource.
> 2. The client receives a EJBTransactionRolledbackException, although
> one branch has been completed.
> Note, that our database does not support heuristical completion of a branch at all, i.e. there should be no Heuristic* exception be thrown either.
> The correct behavior is, to report the transaction as success to the client, commit all branches. All XAResources which failed during XAResource.commit() are supposed to be recovered in future.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months