<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Given the XID in the messages, the sequence looks correct to me.&nbsp; Note that END does not physically end the transaction (commit/rollback), but suspends the work being done on the transaction.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">XA is a strange duck and mapping it onto a more conventional transaction system can result in peculiar &nbsp;behavior.&nbsp; 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.&nbsp; 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.&nbsp; At some point you can
 go back and PREPARE/COMMIT/ROLLBACK the various transactions.&nbsp; 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).&nbsp; The XID allows a session, or
 a transaction manager for that matter, to then control the resolution of the transaction.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Gordy<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Roy Hann [mailto:roy.hann@rationalcommerce.com]
<br>
<b>Sent:</b> Thursday, December 21, 2017 1:32 PM<br>
<b>To:</b> Info-ingres@lists.planetingres.org<br>
<b>Cc:</b> Gordon Thorpe &lt;Gordon.Thorpe@actian.com&gt;<br>
<b>Subject:</b> Re: [Info-ingres] What does XA_END mean in the SC930 log?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Hmmm.<br>
<br>
The reason I was asking is because I am seeing stuff like this:<br>
<br>
EQY:1513854718/299769010:1::50:(232:0):0:1<br>
XA_END:1513854718/620735450:XID(00020005:29:36:00000000:00000000:0000FFFF:0AD01E32:BD045DF2:5A3A5A00:00008CD9:31000000:00000000:000000FF:FF0AD01E:32BD045D:F25A3A5A:0000008C:DC00000<br>
0:00000000:00000000:XA):00000000:0<br>
EQY:1513854718/620833715:-1::50:(232:0):0:0<br>
XA_PREP:1513854718/655271335:XID(00020005:29:36:00000000:00000000:0000FFFF:0AD01E32:BD045DF2:5A3A5A00:00008CD9:31000000:00000000:000000FF:FF0AD01E:32BD045D:F25A3A5A:0000008C:DC0000<br>
00:00000000:00000000:XA):00000000:0<br>
EQY:1513854718/655330225:-1::50:(232:31):0:0<br>
XA_COMM:1513854718/659405680:XID(00020005:29:36:00000000:00000000:0000FFFF:0AD01E32:BD045DF2:5A3A5A00:00008CD9:31000000:00000000:000000FF:FF0AD01E:32BD045D:F25A3A5A:0000008C:DC0000<br>
00:00000000:00000000:XA):00000000:0<br>
EQY:1513854718/659471260:-1::50:(232:31):0:0<br>
<br>
The thing I'm focussing on is the last field of the EQY record, which<br>
is the transaction state indicator (something I added at one of the<br>
sprints a couple of years ago).<br>
<br>
The first EQY shows there is a transaction in progress; the indicator<br>
is 1. We then see an XA_END--as a result of who-knows-what (I don't do<br>
JDBC)--then the following EQY record shows the transaction has<br>
ended because the state indicator is 0.<br>
<br>
If that is the preamble to a 2PC commit then something is broken<br>
because the participant has already committed or rolled back before<br>
voting.<br>
<br>
I am trying to decide if the customer's application is misbehaving. If<br>
their application is expected/required to do whatever logs an XA_END<br>
then maybe the problem is something else.<br>
<br>
Roy<br>
<br>
<br>
Thursday, December 21, 2017, 8:22:06 PM, you wrote:<br>
<br>
&gt; As far as I can recall, XA_END is something that happens prior to<br>
&gt; preparing and committing the distributed connection. The sequence is basically:<br>
&gt; <br>
&gt; XA_START<br>
&gt; XA_END<br>
&gt; XA_PREPARE<br>
&gt; XA_COMMIT<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; XA_END is issued when the XA Transaction Manager calls<br>
&gt; javax.transaction.xa.XAResource.end() &#8211; not that it will help you<br>
&gt; much. Our JdbcXAConn class implements the XAConnection and<br>
&gt; XAResource interfaces and is controlled by a JDBC connection pool<br>
&gt; manager and XA Transaction Manager. What actions drive those<br>
&gt; resources is a bit of a mystery to me.<br>
&gt;<br>
&gt; Gordy<br>
&gt; <br>
&gt; From: Karl and Betty Schendel [<a href="mailto:schendel@kbcomputer.com">mailto:schendel@kbcomputer.com</a>]<br>
&gt; Sent: Thursday, December 21, 2017 9:21 AM<br>
&gt; To: Gordon Thorpe &lt;<a href="mailto:Gordon.Thorpe@actian.com">Gordon.Thorpe@actian.com</a>&gt;<br>
&gt; Subject: Fwd: [Info-ingres] What does XA_END mean in the SC930 log?<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; Hi Gordy,<br>
&gt; don't know if you still see info-ingres questions...<br>
&gt; I can sort of answer the first one, but XA in general is a black box to me.<br>
&gt; <br>
&gt; Karl<br>
&gt; <br>
&gt; <br>
&gt;&gt; Begin forwarded message:<br>
&gt;&gt; <br>
&gt;&gt; From: Roy Hann &lt;<a href="mailto:specially@processed.almost.meat">specially@processed.almost.meat</a>&gt;<br>
&gt;&gt; Subject: [Info-ingres] What does XA_END mean in the SC930 log?<br>
&gt;&gt; Date: December 21, 2017 at 11:54:33 AM EST<br>
&gt;&gt; To: <a href="mailto:info-ingres@lists.planetingres.org">info-ingres@lists.planetingres.org</a><br>
&gt;&gt; <br>
&gt;&gt; When I see an XA_END in the trace log, what will have happened to cause<br>
&gt;&gt; that? Is there a JDBC XAconnection method to explicitly signal the end<br>
&gt;&gt; of the transaction or is it (somehow) implicit?<br>
&gt;&gt; <br>
&gt;&gt; If there was a transaction open but there was no preceding XA_COMM is<br>
&gt;&gt; the transaction implicitly committed or rolled back? (I guess it is<br>
&gt;&gt; committed.)<br>
&gt;&gt; <br>
&gt;&gt; Is whatever it is that causes an XA_END to be logged a legitimate<br>
&gt;&gt; alternative to explicitly executing the commit method on the session<br>
&gt;&gt; object (within a 2PC coordinator)?<br>
&gt;&gt; <br>
&gt;&gt; Roy<br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Info-ingres mailing list<br>
&gt;&gt; <a href="mailto:Info-ingres@lists.planetingres.org">Info-ingres@lists.planetingres.org</a><br>
&gt;&gt; <a href="http://lists.planetingres.org/mailman/listinfo/info-ingres">
http://lists.planetingres.org/mailman/listinfo/info-ingres</a><br>
&gt; <br>
<br>
<br>
<br>
Roy Hann<br>
Rational Commerce Ltd.<br>
T +44 20 8691 2089<br>
&quot;Ingres development, tuning and training experts&quot;<o:p></o:p></p>
</div>
</div>
</body>
</html>