apache / apache/incubator-seata
TCC开启Fence二阶段Cancel可能不会执行
- Dominant language
- Java
- Stars
- 26k
- Forks
- 8.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description

上图中,一阶段业务逻辑如果有异常,会回滚,一阶段的fence_log实际上插入失败了,在回滚过程中,会判断没有fence_log,不执行cancel逻辑,如下图

如果一阶段的业务全是能够被Spring事务管理的操作还可以,如果不是可以被Spring事务管理的操作,这里应该会有问题
Contributor guide
Research direction
Start by tracing the TCC rollback path described in the issue, focusing on the fence_log check and the second-phase cancel decision. Reproduce a first-phase failure involving operations outside Spring transaction management, then verify that the cancel logic still executes when the fence_log insert failed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100