Bug #94130 | XA COMMIT may lead replication broken | ||
---|---|---|---|
Submitted: | 30 Jan 2019 7:22 | Modified: | 12 Apr 2019 18:39 |
Reporter: | phoenix Zhang (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: XA transactions | Severity: | S3 (Non-critical) |
Version: | 5.7.23 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[30 Jan 2019 7:22]
phoenix Zhang
[30 Jan 2019 13:37]
MySQL Verification Team
Hi, I'm not sure I follow properly here. From what I see you did on master XA START XA END XA PREPARE and on SLAVE?! you did XA COMMIT of course it will cause the error, this is not a bug, please explain what exactly are you doing and what you expect thanks Bogdan
[30 Jan 2019 15:04]
phoenix Zhang
All i execute sql on the master server. The slave just do nothing. But what u see above, the master may generate multiple XA COMMIT binlog events with the same xid. And the slave will replicate those events and execute. So, after it execute the first one, the next one will throw Unknown XID sql error
[30 Jan 2019 15:09]
phoenix Zhang
The step is: 1. master open the semi-sync master enabled, and set the timeout big enough 2. master execute XA START INSERT/UPDATE/DELETE XA END XA PREPARE quit 3. let slave net-out 4. In master, open multiple client, all execute XA COMMIT this time, all will not return 5. let slave net-in again now, all XA COMMIT in step 4 will return. And when u check binlog events, all will write the events in binlog file. 6. And, now, the slave is slave sql-error
[30 Jan 2019 15:23]
MySQL Verification Team
the "let slave net-out" in step3 - you disconnect slave from the network or you stop slave?
[31 Jan 2019 2:30]
phoenix Zhang
i disconnect slave from network.
[1 Feb 2019 0:35]
MySQL Verification Team
Thanks for the report I verified the behavior and I do believe it is a bug. all best Bogdan
[12 Apr 2019 18:39]
Paul DuBois
Posted by developer: Fixed in 8.0.18. In replication scenarios, if multiple clients concurrently executed XA COMMIT or XA ROLLBACK statements that used the same XID value, replication inconsistency could occur.