Bug #101552 xa recover and not found xa in the slave
Submitted: 11 Nov 2020 3:57 Modified: 16 Dec 2020 14:08
Reporter: weifan tian Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: XA transactions Severity:S3 (Non-critical)
Version:5.7 OS:Debian
Assigned to: MySQL Verification Team CPU Architecture:Any

[11 Nov 2020 3:57] weifan tian
Description:
when use Multi-source replication, one of slave is rep from secondary and master the same time(gtid is enabled) ,in the master database ,start a transaction , end the transaction , prepare the transaction and commit the transaction,but sometime we can find the trx_mysql_thread_id is 0 in the processlist, but No any xa was found When executing the XA recover command

How to repeat:
>connect client to master server
Loop through the following script

for ((i=1;i<=100000000;i=i+1))
do
  xa='xatest'$i
  /usr/bin/mysql xa_test -e "xa start '${xa}';insert into xa_test(name) values('${xa}');xa end '${xa}';xa PREPARE '${xa}';select sleep(0.2);xa commit '${xa}';"
done

Over time in the slave wo can find:
trx_mysql_thread_id is 0 in the processlist, but No any xa was found When executing the XA recover command ,But in the slave library binlog´╝îWe can see the complete XA transaction
[16 Nov 2020 14:08] MySQL Verification Team
Hi,

I'm running this on 5.7.32 today for many hours without being able to reproduce the problem.

Few questions 
 - can you share config on the both master and slave?
 - in description you mentioned multisource replication but in your explanation how to reproduce you are mentioning master-slave only?
 - what version of mysql are you using?
 - you wrote "Over time in the slave wo can find:" - can you please explain what you mean here by "wo".

Thanks
Bogdan
[17 Dec 2020 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".