[Info-ingres] What does XA_END mean in the SC930 log?
Gordon Thorpe
Gordon.Thorpe at actian.com
Fri Dec 22 20:57:07 UTC 2017
Given the XID in the messages, the sequence looks correct to me. Note that END does not physically end the transaction (commit/rollback), but suspends the work being done on the transaction.
XA is a strange duck and mapping it onto a more conventional transaction system can result in peculiar behavior. For example, in XA you can START a transaction, perform work in the transaction, END work on the transaction, START a different transaction and perform work, etc. You can even re-connect to the first transaction (which is in a suspended state) and do more work on it, or connect to a transaction that was started by some other session, all controlled by the XID. At some point you can go back and PREPARE/COMMIT/ROLLBACK the various transactions. So in the DBMS, an END may remove the association between the session and the XA transaction, but the transaction still exists in a suspended state (I would guess). The XID allows a session, or a transaction manager for that matter, to then control the resolution of the transaction.
Gordy
From: Roy Hann [mailto:roy.hann at rationalcommerce.com]
Sent: Thursday, December 21, 2017 1:32 PM
To: Info-ingres at lists.planetingres.org
Cc: Gordon Thorpe <Gordon.Thorpe at actian.com>
Subject: Re: [Info-ingres] What does XA_END mean in the SC930 log?
Hmmm.
The reason I was asking is because I am seeing stuff like this:
EQY:1513854718/299769010:1::50:(232:0):0:1
XA_END:1513854718/620735450:XID(00020005:29:36:00000000:00000000:0000FFFF:0AD01E32:BD045DF2:5A3A5A00:00008CD9:31000000:00000000:000000FF:FF0AD01E:32BD045D:F25A3A5A:0000008C:DC00000
0:00000000:00000000:XA):00000000:0
EQY:1513854718/620833715:-1::50:(232:0):0:0
XA_PREP:1513854718/655271335:XID(00020005:29:36:00000000:00000000:0000FFFF:0AD01E32:BD045DF2:5A3A5A00:00008CD9:31000000:00000000:000000FF:FF0AD01E:32BD045D:F25A3A5A:0000008C:DC0000
00:00000000:00000000:XA):00000000:0
EQY:1513854718/655330225:-1::50:(232:31):0:0
XA_COMM:1513854718/659405680:XID(00020005:29:36:00000000:00000000:0000FFFF:0AD01E32:BD045DF2:5A3A5A00:00008CD9:31000000:00000000:000000FF:FF0AD01E:32BD045D:F25A3A5A:0000008C:DC0000
00:00000000:00000000:XA):00000000:0
EQY:1513854718/659471260:-1::50:(232:31):0:0
The thing I'm focussing on is the last field of the EQY record, which
is the transaction state indicator (something I added at one of the
sprints a couple of years ago).
The first EQY shows there is a transaction in progress; the indicator
is 1. We then see an XA_END--as a result of who-knows-what (I don't do
JDBC)--then the following EQY record shows the transaction has
ended because the state indicator is 0.
If that is the preamble to a 2PC commit then something is broken
because the participant has already committed or rolled back before
voting.
I am trying to decide if the customer's application is misbehaving. If
their application is expected/required to do whatever logs an XA_END
then maybe the problem is something else.
Roy
Thursday, December 21, 2017, 8:22:06 PM, you wrote:
> As far as I can recall, XA_END is something that happens prior to
> preparing and committing the distributed connection. The sequence is basically:
>
> XA_START
> XA_END
> XA_PREPARE
> XA_COMMIT
>
>
>
> XA_END is issued when the XA Transaction Manager calls
> javax.transaction.xa.XAResource.end() - not that it will help you
> much. Our JdbcXAConn class implements the XAConnection and
> XAResource interfaces and is controlled by a JDBC connection pool
> manager and XA Transaction Manager. What actions drive those
> resources is a bit of a mystery to me.
>
> Gordy
>
> From: Karl and Betty Schendel [mailto:schendel at kbcomputer.com]
> Sent: Thursday, December 21, 2017 9:21 AM
> To: Gordon Thorpe <Gordon.Thorpe at actian.com<mailto:Gordon.Thorpe at actian.com>>
> Subject: Fwd: [Info-ingres] What does XA_END mean in the SC930 log?
>
>
>
> Hi Gordy,
> don't know if you still see info-ingres questions...
> I can sort of answer the first one, but XA in general is a black box to me.
>
> Karl
>
>
>> Begin forwarded message:
>>
>> From: Roy Hann <specially at processed.almost.meat<mailto:specially at processed.almost.meat>>
>> Subject: [Info-ingres] What does XA_END mean in the SC930 log?
>> Date: December 21, 2017 at 11:54:33 AM EST
>> To: info-ingres at lists.planetingres.org<mailto:info-ingres at lists.planetingres.org>
>>
>> When I see an XA_END in the trace log, what will have happened to cause
>> that? Is there a JDBC XAconnection method to explicitly signal the end
>> of the transaction or is it (somehow) implicit?
>>
>> If there was a transaction open but there was no preceding XA_COMM is
>> the transaction implicitly committed or rolled back? (I guess it is
>> committed.)
>>
>> Is whatever it is that causes an XA_END to be logged a legitimate
>> alternative to explicitly executing the commit method on the session
>> object (within a 2PC coordinator)?
>>
>> Roy
>>
>>
>> _______________________________________________
>> Info-ingres mailing list
>> Info-ingres at lists.planetingres.org<mailto:Info-ingres at lists.planetingres.org>
>> http://lists.planetingres.org/mailman/listinfo/info-ingres<http://lists.planetingres.org/mailman/listinfo/info-ingres>
>
Roy Hann
Rational Commerce Ltd.
T +44 20 8691 2089
"Ingres development, tuning and training experts"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20171222/0df02a72/attachment.html>
More information about the Info-ingres
mailing list