apache / apache/incubator-seata
saga模式下,事务正常执行完成,seata全局事务表里该事务记录超期后,seata会执行回滚逻辑
- Dominant language
- Java
- Stars
- 26k
- Forks
- 8.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
- [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.
### Ⅰ. Issue Description
我在使用seata saga模式,版本是1.5.2
以下有四个场景:
场景一:事务有异常,事务回滚成功业务库seata_state_machine_inst表中的STATUS字段为UN,compensation_status字段为SU,seata库global_table表记录了相应的全局事务,timeout字段值为1800000,三十分钟后该记录消失,没有触发回滚逻辑
场景二:事务正常执行,seata_state_machine_inst表中的STATUS字段为SU,compensation_status字段为null,seata库global_table表记录了相应的全局事务,timeout字段值为1800000,三十分钟后触发回滚逻辑
场景三:事务正常执行,seata_state_machine_inst表中的STATUS字段为SU,compensation_status字段为null,我手动给compensation_status字段填入UN值,seata库global_table表记录了相应的全局事务,timeout字段值为1800000,三十分钟后触发回滚逻辑
场景四:事务正常执行,seata_state_machine_inst表中的STATUS字段为SU,compensation_status字段为null,我手动给compensation_status字段填入SU值,seata库global_table表记录了相应的全局事务,timeout字段值为1800000,三十分钟没有触发回滚逻辑,记录消失
求助是否是我编写的saga状态机json有问题,需要显式设置一下compensation_status,还是要在回滚逻辑判断一下STATUS值,还是seata有bug,判断STATUS SU以后不应该再去读取compensation_status字段
下面这个issue描述应该和我遇到的问题一致,但是看了评论好像没完全修复
#5424
Contributor guide
Research direction
Reproduce the four Saga scenarios described for Seata 1.5.2, inspecting seata_state_machine_inst.STATUS and compensation_status alongside the global_table timeout record. Start by comparing the expiration and rollback handling, then review issue #5424 and its comments. Done means the expected behavior for completed and failed transactions is reproduced, explained, and covered by an agreed fix or documentation.
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
- Needs clarification
- Newbie friendliness
- 28/100