Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upIncorrect return code for error on call of commit during 2PC #236
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
This was fixed in PR #78. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ochaloup
Nov 30, 2015
Contributor
Hi @whitingjr,
I'm sorry that could be easily my fault but I can't see the connection between PR#78 and this reported bug. What I can see the PR#78 (dc44225) changes the way how distinguish throwing XAER_NOTA but this issue is about returning XAER_RETRY or FAIL instead of XAER_RMERR.
ondra
|
Hi @whitingjr, I'm sorry that could be easily my fault but I can't see the connection between PR#78 and this reported bug. What I can see the PR#78 (dc44225) changes the way how distinguish throwing ondra |
ochaloup
referenced this issue
Feb 9, 2016
Closed
Incorrect return code for error of commit call during 1PC #510
added a commit
to ochaloup/pgjdbc
that referenced
this issue
Mar 14, 2017
added a commit
to ochaloup/pgjdbc
that referenced
this issue
Mar 14, 2017
added a commit
to ochaloup/pgjdbc
that referenced
this issue
Mar 15, 2017
ochaloup
referenced this issue
Mar 15, 2017
Merged
Adjust XAException return codes for better compatibility with XA specification #782
added a commit
to Spirals-Team/librepair-experiments
that referenced
this issue
Mar 15, 2017
added a commit
to ochaloup/pgjdbc
that referenced
this issue
Mar 21, 2017
added a commit
to surli/librepair-XP
that referenced
this issue
Apr 6, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@ochaloup your absolutely right. please disregard the comment. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ochaloup
Jan 5, 2018
Contributor
@whitingjr ok, I haven't received your previous comment :) I have this issue in mind still but I haven't got time to properly test my proposal changes. Huh, unfortunately :/
|
@whitingjr ok, I haven't received your previous comment :) I have this issue in mind still but I haven't got time to properly test my proposal changes. Huh, unfortunately :/ |
ochaloup commentedDec 10, 2014
PostgreSQL jdbc driver returns incorrect code during on call of commit during 2PC. Currently the driver returns XAER_RMERR.
I expect that it's this call
https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/xa/PGXAConnection.java#L528
But the XA spec (http://pubs.opengroup.org/onlinepubs/009680699/toc.pdf) says for XAER_RMERR that
"An error occurred in committing the work performed on behalf of the transaction
branch and the branch’s work has been rolled back. Note that returning this error
signals a catastrophic event to a transaction manager since other resource
managers may successfully commit their work on behalf of this branch. This error
should be returned only when a resource manager concludes that it can never
commit the branch and that it cannot hold the branch’s resources in a prepared
state. Otherwise, [XA_RETRY] should be returned."
In case there is longer discussion about scenario hitting this issue and about handling this at RedHat bugzilla here:
https://bugzilla.redhat.com/show_bug.cgi?id=988724
From what is said here I think that PostgreSQL database should rollback the transaction itself and then it could return XAException error code XAER_RMERR or it should return
XAER_RMFAIL or XAER_RETRY.