Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#18911
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
D3Hunter authored and ti-chi-bot committed Sep 14, 2024
1 parent 1715e27 commit 8e00f1b
Showing 1 changed file with 6 additions and 0 deletions.
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))
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

0 comments on commit 8e00f1b

Please sign in to comment.