apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.25k stars 8.77k forks source link

TimeoutRollbacked and Rollbacked residues #6875

Open funky-eyes opened 1 week ago

funky-eyes commented 1 week ago

Ⅰ. Issue Description

TimeoutRollbacked和Rollbacked在db,redis等网络出现问题时,会删除失败,除非重启server,否则这个数据将一直残留,file下如盘满了等情况change status成功后,删除可能就失败了,也会残留 目前DefaultCoordinator中针对committed这种状态是有补偿的,对TimeoutRollbacked和Rollbacked没有任何补偿处理。 In cases where there are network issues with databases, Redis, etc., data may be deleted unsuccessfully and will remain unless the server is restarted. If the disk is full or there are other issues, even after a successful change of status, deletion may fail, leaving the data residual. Currently, in DefaultCoordinator, there is compensation handling for the committed state, but there is no compensation handling for the TimeoutRollbacked and Rollbacked states.

    private final GlobalStatus[] retryRollbackingStatuses = new GlobalStatus[] {
        GlobalStatus.TimeoutRollbacking,
        GlobalStatus.TimeoutRollbackRetrying, GlobalStatus.RollbackRetrying};

    private final GlobalStatus[] retryCommittingStatuses = new GlobalStatus[] {GlobalStatus.CommitRetrying, GlobalStatus.Committed};

Ⅱ. 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

Minimal yet complete reproducer code (or URL to code):

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

varungujarathi9 commented 1 week ago

Hey I can work on this

funky-eyes commented 6 days ago

Hey I can work on this

Okay, looking forward to your PR