-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Operate transactions design
WangLiang/王良 edited this page Jan 9, 2024
·
38 revisions
- 重试:GlobalStatus.Committing, GlobalStatus.CommitRetrying, GlobalStatus.Committed, GlobalStatus.TimeoutRollbacking,GlobalStatus.TimeoutRollbackRetrying, GlobalStatus.RollbackRetrying, GlobalStatus.Rollbacking
- 失败:CommitFailed,RollbackFailed,TimeoutRollbackFailed,CommitRetryTimeout, RollbackRetryTimeout
- 其他:Begin,AsyncCommitting,Committed,Rollbacked,Finished
下⽂的重试,失败状态指上述这些状态
注意:定时任务跳过该全局事务为PhaseTwo_STOP_Retryable的状态即可
问题:
将失败的修改为重试状态:
- CommitFailed / RollbackFailed :是否要考虑超时时间问题,因为这期间可能过了很久,修改后会⻢上超时⽽失败
- 针对TimeoutRollbackFailed / CommitRetryTimeout / RollbackRetryTimeout,有两个做法
- 不⽀持修改,直接报错
- ⽀持修改,但需要需要传⼊新的超时时间