[MXS-2431] Support XA transactions Created: 2019-04-11  Updated: 2021-09-28  Resolved: 2021-09-28

Status: Closed
Project: MariaDB MaxScale
Component/s: qc_sqlite
Affects Version/s: 2.3.4
Fix Version/s: N/A

Type: New Feature Priority: Major
Reporter: Wagner Bianchi (Inactive) Assignee: Johan Wikman
Resolution: Duplicate Votes: 3
Labels: None

Issue Links:
Duplicate
duplicates MXS-1350 Add XA transaction support Closed

 Description   

Hello Folks,

We implemented the MaxScale 2.3.4 in production and after releasing the applications to connect to it, we started seeing errors like these below:

2019-04-11 10:24:01.182   warning: (48) (discard_if_response_differs): Slave server 'x02': response (0xff) differs from master's response (0x00) to COM_QUERY: `XA PREPARE 0x38366333333166622d643437342d343761662d616232342d356332343034643138336139,0x312e353534393139363739373635303636344531322d6d70656532373435363539,0x41544f4d`. Closing slave connection due to inconsistent session state.
2019-04-11 10:43:52.198   warning: (16189) (discard_if_response_differs): Slave server 'x03': response (0xff) differs from master's response (0x00) to COM_QUERY: `XA PREPARE 0x312e353534393139373132333636393730354531322d746173313535343937353833323034373037333834,0x312e353534393139373132333636393730354531322d746173323935333932,0x41544f4d`. Closing slave connection due to inconsistent session state.

I recall having a similar issue with the SELECT ... INTO OUTFILE some time ago when a query was sent to master and also to slaves, creating this inconsistency for the session in MaxScale (https://jira.mariadb.org/browse/MXS-2079).

The current list servers is like below:

[root@xx01 ~]# maxctrl list servers
┌──────────────┬────────────────┬──────┬─────────────┬─────────────────┬──────────────┐
│ Server       │ Address        │ Port │ Connections │ State           │ GTID         │
├──────────────┼────────────────┼──────┼─────────────┼─────────────────┼──────────────┤
│ x01          │ 111.222.111.2213306221         │ Master, Running │ 0-1-61835925
├──────────────┼────────────────┼──────┼─────────────┼─────────────────┼──────────────┤
│ x02          │ 111.222.111.2223306219         │ Slave, Running  │ 0-1-61835925
├──────────────┼────────────────┼──────┼─────────────┼─────────────────┼──────────────┤
│ x03          │ 111.222.111.2233306219         │ Slave, Running  │ 0-1-61835925
└──────────────┴────────────────┴──────┴─────────────┴─────────────────┴──────────────┘

XA Transactions should be entirely executed on x01, not touching slaves.

Thanks for your attention folks, cheers!



 Comments   
Comment by markus makela [ 2019-04-11 ]

johan.wikman I think you mentioned that this is a bug in the query classifier so I assigned it to you.

Comment by Johan Wikman [ 2019-04-16 ]

It's not sufficient to just recognize the statement, but XA statements must affect the transaction state as well.

Not fixable for 2.3.6, so this must be postponed to 2.3.7.

Comment by markus makela [ 2021-09-28 ]

Closing as a duplicate of MXS-1350.

Generated at Thu Feb 08 04:14:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.