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

Unexpected transaction rollback #4997

Closed
1 task
funky-eyes opened this issue Oct 17, 2022 · 1 comment · Fixed by #5051
Closed
1 task

Unexpected transaction rollback #4997

funky-eyes opened this issue Oct 17, 2022 · 1 comment · Fixed by #5051

Comments

@funky-eyes
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

当出现如下情况时,事务将被意外回滚
1.当这个商品被创建后,事务决议成回滚状态
2.随之商品被创建后又被其他本地事务(没有加globaltransational注解或者传递xid失败的情况下)给修改了,比如库存,商品描述之类的
3.这个商品一直被脏写无法回滚,因为已经被修改了
4.这个商品在某一天被改回了当初创建出来的数据,seata-server下发回滚发现后镜像跟undolog中记录一致,所以回滚掉了

A transaction will be unexpectedly rolled back when the following occurs

  1. When the commodity is created, the transaction resolution becomes a rollback state
  2. After the product is created, it is modified by other local transactions (without adding global transactive annotations or failing to pass xid), such as inventory, product description, etc
  3. This item has been dirty writing and cannot be rolled back because it has been modified
  4. This product was changed back to the original created data one day, and the seata-server delivery rollback found that the afterimage was consistent with the record in undolog, so it was rolled back

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

Just paste your stack trace here!

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. xxx
  2. xxx
  3. xxx

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version :
  • Seata version:
  • OS :
  • Others:
@funky-eyes
Copy link
Contributor Author

1.当出现脏数据无法回滚时,应该上报二阶段状态为PhaseTwo_RollbackFailed_Unretryable,将全局事务改成RollbackFailed,避免出现issue中的情况
2.未来在控制台中突出不可重试的事务,提示用要求用户手动修订

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

Successfully merging a pull request may close this issue.

1 participant