apache / apache/incubator-seata

TCC开启Fence二阶段Cancel可能不会执行

Open
#5,256 8 comments 0 reactions 0 assignees View on GitHub
type: discussion
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

![image](https://user-images.githubusercontent.com/96557610/212825630-00547cb2-7523-4e46-82f3-ddf8a24c154c.png)

上图中,一阶段业务逻辑如果有异常,会回滚,一阶段的fence_log实际上插入失败了,在回滚过程中,会判断没有fence_log,不执行cancel逻辑,如下图
![image](https://user-images.githubusercontent.com/96557610/212826068-8dd31d04-1d81-4e2a-a3a0-823914a93d84.png)
如果一阶段的业务全是能够被Spring事务管理的操作还可以,如果不是可以被Spring事务管理的操作,这里应该会有问题

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.