From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Ondrej Chaloupka <ochaloup(at)redhat(dot)com> |
Cc: | List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Incorrect return code for error on call of commit during 2PC |
Date: | 2014-12-10 11:44:03 |
Message-ID: | CADK3HHKyT8QYMq3LVsfK_YqosjtV1B7cDqS2vtycap1om=Cz1Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Go ahead open an issue on github
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
On 10 December 2014 at 03:08, Ondrej Chaloupka <ochaloup(at)redhat(dot)com> wrote:
> Hi,
>
> it seems that PostgreSQL jdbc driver returns incorrect code 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.
>
> Would you mind my opening a issue for PostgreSQL jdbc driver?
>
> Thank you
> Ondra Chaloupka
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
From | Date | Subject | |
---|---|---|---|
Next Message | Leonard Meyer | 2014-12-10 13:21:57 | Re: Infinite waitOnLock |
Previous Message | Dave Cramer | 2014-12-10 11:34:48 | Re: Infinite waitOnLock |