apache / apache/incubator-seata
全局事务结束逻辑优化
- 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
1、PR #4233 在处理lock数据残留时,将方法io.seata.server.session.GlobalSession#clean 判断是否有AT branch的逻辑移到外层,这会导致 TCC 全局事务在二阶段会执行clean资源清除动作(实际上TCC没有lock资源);
2、目前的全局事务end方法与各个模式是紧密耦合在一起的,导致逻辑复杂不易扩展,需要考虑将end方法抽象出来,每个模式具备自己的end逻辑;
3、其它优化:io.seata.server.coordinator.DefaultCore#doGlobalCommit 方法理论上只有 TCC 才会走到二阶段提交失败并且不可重复(PhaseTwo_CommitFailed_Unretryable)逻辑,不需要再判断是否可异步提交(canBeCommittedAsync)。
### Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
```
Just paste your stack trace here!
```
### Ⅲ. Describe what you expected to happen
### Ⅳ. How to reproduce it (as minimally and precisely as possible)
1. xxx
2. xxx
3. xxx
### Ⅴ. Anything else we need to know?
### Ⅵ. Environment:
- JDK version :
- Seata version:
- OS :
- Others:
Contributor guide
Assessment
This issue has not been assessed yet.