Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.1.14
-
RHEL 6.7 (Santiago)
Description
If XA DML is submitted to an operating Galera cluster and innodb_support_xa is on, the cluster will crash as soon as an XA transaction is committed, and it must be rebuilt as a new cluster. If innodb_support_xa is off, the cluster won't crash, but XA transactions committed are not propagated to the other nodes, which puts them out of sync, causing the nodes to fail later when a contradictory change is posted.
I understand that XA is documented as not supported in a Galera cluster. The purpose of this issue is to have such transactions rejected when attempted, instead of causing the cluster to fail. (And, of course, it would be great if XA were supported in Galera, but that's not a bug...)
I experience the same issue. Having run java application on Wildfly. Using MariaDB Cluster 10.1.10 with jdbc driver version 1.5.4.
I was trying to reproduce the issue by simply running SQL commands against the database but that way I wasn't succesful. My attempt was like
XA START 0x00000000000000000000FFFF7F000001C7C103BA58934BC30000001C31,0x00000000000000000000FFFF7F000001C7C103BA58934BC3000000220000000100000000,131077
SELECT * from TEST where id = 1
update TEST set NAME='ondrej' where ID=1XA END 0x00000000000000000000FFFF7F000001C7C103BA58934BC30000001C31,0x00000000000000000000FFFF7F000001C7C103BA58934BC3000000220000000100000000,131077 2017-02-02 16:10:08,862
XA COMMIT 0x00000000000000000000FFFF7F000001C7C103BA58934BC30000001C31,0x00000000000000000000FFFF7F000001C7C103BA58934BC3000000220000000100000000,131077 ONE PHASE
When such sequence is run by the java app the MariaDB cluster node crashes and the commit returns exception
Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not read resultset: unexpected end of stream, read 0 bytes from 4Query is : XA COMMIT 0x00000000000000000000FFFF7F000001C7C103BA58934BC30000001C31,0x00000000000000000000FFFF7F000001C7C103BA58934BC3000000220000000100000000,131077 ONE PHASE
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1063)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:136)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:251)
... 65 more
Caused by: java.io.EOFException: unexpected end of stream, read 0 bytes from 4
at org.mariadb.jdbc.internal.packet.read.ReadPacketFetcher.getReusableBuffer(ReadPacketFetcher.java:178)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1054)
... 67 more
and any other next connection returns exception
Caused by: java.lang.RuntimeException: Sql execution operation failed.
Status code 500, reason: java.sql.SQLNonTransientConnectionException:
(conn:29) WSREP has not yet prepared node for application use
Query is : SELECT 1