apache / apache/incubator-seata
分支事务回滚了,但是TM还是正常的提交
- 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
分支 try{} catch(){} 了异常,返回正常。 可是 TM 提交了commit
代码
ConnectionProxy
@Override
public void rollback() throws SQLException {
targetConnection.rollback();
if (context.inGlobalTransaction()) {
if (context.isBranchRegistered()) {
report(false);
}
}
context.reset();
}
并没有走到 report(false);
这块是不是可以优化一下
Contributor guide
Research direction
Start by tracing the rollback path in ConnectionProxy, especially the conditions around context.inGlobalTransaction(), context.isBranchRegistered(), and report(false). Compare the branch rollback outcome with the TM commit behavior, then verify that the reported scenario no longer allows a successful TM commit after the branch catches an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100