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 (#18911) #18914

Merged
Merged
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions tidb-lightning/tidb-lightning-logical-import-mode-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ Conflicting data refers to two or more records with the same data in the PK or U
| Strategy | Default behavior of conflicting data | The corresponding SQL statement |
| :-- | :-- | :-- |
| `"replace"` | Replacing existing data with new data. | `REPLACE INTO ...` |
<<<<<<< HEAD
| `"ignore"` | Keeping existing data and ignoring new data. | `INSERT IGNORE INTO ...` |
| `"error"` | Pausing the import and reporting an error. | `INSERT INTO ...` |
| `""` | TiDB Lightning does not detect or handle conflicting data. If data with primary and unique key conflicts exists, the subsequent step reports an error. | None |
=======
| `"ignore"` | Keeping existing data and ignoring new data. | If `conflict.threshold` is greater than 0, `INSERT INTO` is used; if `conflict.threshold` is `0`, `INSERT IGNORE INTO ...` is used |
| `"error"` | Terminating the import when conflicting data is detected. | `INSERT INTO ...` |
| `""` | Converted to `"error"`, which means terminating the import when conflicting data is detected. | None |
>>>>>>> 3a6cb735bd (change lightning conflict resolution ignore (#18911))
D3Hunter marked this conversation as resolved.
Show resolved Hide resolved

When the strategy is `"error"`, errors caused by conflicting data directly terminates the import task. When the strategy is `"replace"` or `"ignore"`, you can control the maximum tolerant conflicts by configuring [`conflict.threshold`](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-task). The default value is `9223372036854775807`, which means that almost all errors are tolerant.

Expand Down
Loading