apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.35k stars 8.78k forks source link

xa模式事务无法提交 #4759

Open xiabx opened 2 years ago

xiabx commented 2 years ago

Ⅰ. Issue Description

seata版本是1.5.1,使用xa模式时,mysql的xa事务无法提交,rm和tm也没报错。但是在mysql里看事务并没有提交成功,通过查innodb_trx表可以查到。XA RECOVER也可以查到。

这个问题在连5.7.38版本mysql时会出现,但是用8.0.29时候xa事务能正常提交。

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace: rm和tm未报错

Just paste your stack trace here!

Ⅲ. Describe what you expected to happen

期望xa事务可以在5.7.38版本mysql可以正常提交。

Ⅳ. How to reproduce it (as minimally and precisely as possible)

https://gitee.com/helloxia/springboot-consul-seata.git

  1. mysql使用5.7.38
  2. 项目启动后访问: http://[localhost:9202/purchase/commit?userId=U1&commodityCode=C1&orderCount=1
  3. 通过mysql命令XA RECOVER 查看事务是否提交

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

funky-eyes commented 2 years ago

麻烦模拟一次事务请求,把相关server端的日志和client端的日志都发一下

funky-eyes commented 2 years ago

已确认为手动代理和自动代理混用导致的bug,后续我们将修复此问题,目前先只是用其中一个方式来解决此问题