apache / apache/incubator-seata

When use tcc fence,we might be able to add a config to enable empty rollback

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

Description

## Why you need it?
Is your feature request related to a problem? Please describe in details
即将发布的1.5版本中,TCC如果开启防悬挂功能,会同时依赖防悬挂表对空回滚进行拦截。

其实现原理是:回滚到来时检查防悬挂表是否有记录,如果无记录则直接返回“回滚成功”。

造成的问题:由于防悬挂表写入和一阶段本地事务绑定,如果一阶段部分执行过程中异常回滚,回滚也会被视为空回滚而拦截。而很多场景下 TCC 一阶段并不只有 DB 事务操作,希望一阶段异常后能正常收到回滚请求去做一些逻辑处理。

## How it could be?
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.
我们公司的做法是通过在TCC注解添加了一个boolean配置,为true时便不拦截空回滚请求,有这类问题困扰的业务可自行通过该配置去做取舍平衡。

## Other related information
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Research direction

Start by locating the TCC annotation and the empty-rollback interception path described in the issue, then inspect how anti-hanging records are checked in the 1.5 implementation. Add a boolean configuration that controls whether empty rollback requests are intercepted, and verify both settings with focused tests for normal and empty rollback behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Feature
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.