apache / apache/incubator-seata

AT 模式下, seata-server 存在 global_table 状态为 committed 的数据无法删除的情况

Open
#4,063 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

### Issue Description

AT 模式下, seata-server 处理 **全局事务提交** 时,

`io.seata.server.session.SessionHelper#endCommitted`

执行到如下步骤时 :

```java
public static void endCommitted(GlobalSession globalSession) throws TransactionException {
globalSession.changeStatus(GlobalStatus.Committed);
globalSession.end();
}
```

如果 **seata-server** 进程异常终止, 会导致 global_table **本次全局事务** 的数据状态一直为 **committed**, 并且无法删除.

### Environment:

- JDK version : 1.8
- Seata version: 1.4.1
- OS : macOS

Contributor guide

Open the contributing guide

Research direction

Start at io.seata.server.session.SessionHelper#endCommitted and trace how global_table persistence is handled after globalSession.changeStatus(Committed) and globalSession.end(). Reproduce or inspect recovery after an abnormal seata-server termination, then verify that the affected committed global transaction can be cleaned up without affecting transaction consistency.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.