Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change lightning conflict resolution ignore (#18641) #18644

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tidb-lightning/tidb-lightning-logical-import-mode-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ TiDB Lightning 的完整配置文件可参考[完整配置及命令行参数](/t

冲突数据是指两条或两条以上记录中存在主键或唯一键列数据重复。TiDB Lightning 的逻辑导入模式通过 [`conflict.strategy`](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-任务配置) 配置冲突数据的处理行为,使用不同的 SQL 语句进行导入。

<<<<<<< HEAD
D3Hunter marked this conversation as resolved.
Show resolved Hide resolved
| 策略 | 冲突时默认行为 | 对应 SQL 语句 |
|:---|:---|:---|
| `"replace"` | 新数据替代旧数据 | `REPLACE INTO ...` |
| `"ignore"` | 保留旧数据,忽略新数据 | `INSERT IGNORE INTO ...` |
| `"ignore"` | 保留旧数据,忽略新数据 | 如果 `conflict.threshold` 大于 `0`,则为 `INSERT INTO ...`;如果 `conflict.threshold` 为 `0`,则为 `INSERT IGNORE INTO ...` |
D3Hunter marked this conversation as resolved.
Show resolved Hide resolved
| `"error"` | 终止导入 | `INSERT INTO ...` |
| `""` | 不进行冲突检查和处理,但如果存在有主键和唯一键冲突的数据,会在后续步骤报错 | 无 |

Expand Down
Loading