Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1100591

Summary: CMR recovery problem with DB2
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Hayk Hovsepyan <hhovsepy>
Component: Transaction ManagerAssignee: Michael <mmusgrov>
Status: CLOSED CURRENTRELEASE QA Contact: Ondrej Chaloupka <ochaloup>
Severity: high Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.3.0CC: hhovsepy, ochaloup, tom.jenkinson
Target Milestone: ER9   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 14:34:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
DB2-10TRACE none

Description Hayk Hovsepyan 2014-05-23 07:27:40 UTC
Description of problem:
While testing of CMR with DB2-10 and after test is finished there
are some additional rows in the "xids" table.
And in log we can see "com.ibm.db2.jcc.am.SqlSyntaxErrorException"
in recovery process. 

Version-Release number of selected component (if applicable):
6.3.0.ER4

How reproducible:
always

Steps to Reproduce:
1) enlist CMR datasource
2) enlist XA test datasource
3) prepare CMR
4) prepare XA
5) commit on CMR datasource
6) commit on XA datasource - crash on the end of commit method.
7) do recovery 

Actual results:
additional rows in "xids" table, error in log which is attached

Expected results:
"xids" table is cleaned after recovery

Additional info:
problem occurs for DB2-10 and DB2-97

Comment 1 Hayk Hovsepyan 2014-05-23 07:29:10 UTC
Created attachment 898566 [details]
DB2-10TRACE

Comment 2 Hayk Hovsepyan 2014-05-23 07:29:51 UTC
One more strange thing is that XID and ACTIONUID columns have Null
value in "xids" table.

Comment 3 Hayk Hovsepyan 2014-05-23 07:34:59 UTC
Even when making XID and ACTIONUID columns to be NOT NULL while creating "xids" table, they still have NULL values.

Comment 4 Hayk Hovsepyan 2014-07-01 13:15:04 UTC
Here is a log message which can be the cause of problem:
"14:12:06,051 WARN  [com.arjuna.ats.arjuna] (Periodic Recovery) Could not handle connection: com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][t4][1092][11638][4.13.127] Invalid data conversion: Wrong result column type for requested conversion. ERRORCODE=-4461, SQLSTATE=42815"

Comment 5 tom.jenkinson 2014-07-03 14:57:50 UTC
Hi Hayk,

I can confirmed the issue is just with the create table syntax we are using:

https://github.com/tomjenkinson/narayana/commit/fd01f015041fbf6c2d8a8c2a49a7cb6ad39ad943

It should be: 
create table xids (xid VARCHAR(255) for bit data not null, transactionManagerID varchar(64), actionuid VARCHAR(255) for bit data not null)

Please can you verify it works for your test and if so we can raise a documentation issue.

Thanks,
Tom

Comment 6 Hayk Hovsepyan 2014-07-03 15:23:07 UTC
Hi Tom,

Thank you for doing research.

I confirm that test scenarios work with the new "create table" syntax.
So putting the issue verified.

Thanks,
Hayk.