apache / apache/incubator-seata

AT 模式 insert ignore / insert on duplicate 回滚时会导致数据被错误删除

Open
#3,606 4 comments 0 reactions 0 assignees View on GitHub
task: help-wanted
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

- [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.

### Ⅰ. Issue Description
insert sql,都没有生成 beforeImage;undo 时直接删除 afterImage中的主键相关行。会导致 insert ignore / insert on duplicate 没有真正插入数据时,一旦回滚,会造成数据被误删。

### Ⅱ. 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 :
- OS :
- Others:

Contributor guide

Open the contributing guide

Research direction

The report concerns AT-mode undo handling for INSERT SQL, specifically insert ignore and insert on duplicate. Start by reproducing the rollback case described; done means rollback no longer deletes an existing row when the insert did not actually add data. No source file or test is named, so the relevant implementation and regression test still need to be located.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.