apache / apache/incubator-seata

xa模式事务无法提交

Open
#4,759 2 comments 0 reactions 0 assignees View on GitHub
task: help-wanted
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

- [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.

### Ⅰ. 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:

- JDK version : 1.8
- Seata version: 1.5.1
- OS : windows
- Others: mysql 5.7.38

Contributor guide

Open the contributing guide

Research direction

Start with the linked springboot-consul-seata reproduction project and run the purchase commit flow against MySQL 5.7.38 and 8.0.29. Check XA RECOVER and innodb_trx after the request, then trace the XA transaction handling involved in the reproduction. Done means the XA transaction commits successfully on MySQL 5.7.38 without RM or TM errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mysql
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.