Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tcc-fence模式下无法正确处理空回滚 #53

Open
yangwenbinch opened this issue Aug 30, 2024 · 1 comment
Open

Tcc-fence模式下无法正确处理空回滚 #53

yangwenbinch opened this issue Aug 30, 2024 · 1 comment

Comments

@yangwenbinch
Copy link

What happened:
Tcc-fence模式下开启本地事务表后,无法正确处理空回滚,空回滚无限重试直至超时

What you expected to happen:
正确处理空回滚并插入挂起状态记录,防止悬挂

How to reproduce it (as minimally and precisely as possible):
模拟空回滚,prepare时不插入记录
Anything else we need to know?:

TCC-fence模式下空回滚无法正常消费,无限重试

当发生空回滚时,应返回正确状态并不做回滚操作,当使用tcc-fence模式时,如果发生空回滚

首先调用query方法确认是否执行prepare,之后再插入悬挂记录

image-20240830175111372

此时在查询时,如果没有记录会返回报错

image-20240830175212170

导致无法执行插入逻辑并直接返回回滚失败

因在执行prepare前进行了分支注册

image-20240830175447533

此时服务端会无限发起rollback重试请求直到超时

@yangwenbinch
Copy link
Author

示例代码存在相同问题,跑不通的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant