From 463e10235b0fee8d3b8c3b8cb117be626e96dcac Mon Sep 17 00:00:00 2001 From: Luo Yangzhixin Date: Wed, 27 Mar 2024 14:58:44 +0800 Subject: [PATCH 1/5] Update tidb-lightning-error-resolution.md --- tidb-lightning/tidb-lightning-error-resolution.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tidb-lightning/tidb-lightning-error-resolution.md b/tidb-lightning/tidb-lightning-error-resolution.md index 56126e88328a8..bb81afe184e85 100644 --- a/tidb-lightning/tidb-lightning-error-resolution.md +++ b/tidb-lightning/tidb-lightning-error-resolution.md @@ -194,7 +194,7 @@ In this example, a data source is prepared with some known errors. EOF ``` -3. Configure TiDB Lightning to enable strict SQL mode, use the Local-backend to import data, delete duplicates, and skip up to 10 errors. +3. Configure TiDB Lightning to enable strict SQL mode, use the Local-backend to import data, replace duplicates, and skip up to 10 errors. {{< copyable "shell-regular" >}} @@ -207,8 +207,8 @@ In this example, a data source is prepared with some known errors. [tikv-importer] backend = 'local' sorted-kv-dir = '/tmp/lightning-tmp/' - duplicate-resolution = 'remove' - + [conflict] + strategy = 'replace' [mydumper] data-source-dir = '.' [tidb] From 4ecbf5da78693ac8859f48a01cf14ffc18bee487 Mon Sep 17 00:00:00 2001 From: lyzx2001 Date: Wed, 27 Mar 2024 15:20:19 +0800 Subject: [PATCH 2/5] update removal --- tidb-lightning/tidb-lightning-configuration.md | 2 +- tidb-lightning/tidb-lightning-error-resolution.md | 2 +- tidb-lightning/tidb-lightning-physical-import-mode-usage.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tidb-lightning/tidb-lightning-configuration.md b/tidb-lightning/tidb-lightning-configuration.md index e173df1cc0f0e..43aad681620cc 100644 --- a/tidb-lightning/tidb-lightning-configuration.md +++ b/tidb-lightning/tidb-lightning-configuration.md @@ -153,7 +153,7 @@ strategy = "" # Note that this parameter is only used in scenarios where the target table is empty. # parallel-import = false -# Starting from v8.0.0, the `duplicate-resolution` parameter is deprecated. For more information, see . +# Starting from v8.0.0, the `duplicate-resolution` parameter is deprecated. This parameter will be removed in v8.5. For more information, see . # Whether to detect and resolve duplicate records (unique key conflict) in the physical import mode. # The following resolution algorithms are supported: # - none: does not detect duplicate records, which has the best performance of the two algorithms. diff --git a/tidb-lightning/tidb-lightning-error-resolution.md b/tidb-lightning/tidb-lightning-error-resolution.md index bb81afe184e85..cc4f2914594c0 100644 --- a/tidb-lightning/tidb-lightning-error-resolution.md +++ b/tidb-lightning/tidb-lightning-error-resolution.md @@ -11,7 +11,7 @@ This document introduces TiDB Lightning error types, how to query the errors, an - `lightning.max-error`: the tolerance threshold of type error - `conflict.strategy`, `conflict.threshold`, and `conflict.max-record-rows`: configurations related to conflicting data -- `tikv-importer.duplicate-resolution` (deprecated in v8.0.0): the conflict handling configuration that can only be used in the physical import mode +- `tikv-importer.duplicate-resolution` (deprecated in v8.0.0, will be removed in v8.5): the conflict handling configuration that can only be used in the physical import mode - `lightning.task-info-schema-name`: the database where conflicting data is stored when TiDB Lightning detects conflicts For more information, see [TiDB Lightning (Task)](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-task). diff --git a/tidb-lightning/tidb-lightning-physical-import-mode-usage.md b/tidb-lightning/tidb-lightning-physical-import-mode-usage.md index 55c59c0ae2bc9..32c389178ae33 100644 --- a/tidb-lightning/tidb-lightning-physical-import-mode-usage.md +++ b/tidb-lightning/tidb-lightning-physical-import-mode-usage.md @@ -46,7 +46,7 @@ strategy = "" # Import mode. "local" means using the physical import mode. backend = "local" -# Starting from v8.0.0, the `duplicate-resolution` parameter is deprecated. For more information, see . +# Starting from v8.0.0, the `duplicate-resolution` parameter is deprecated. This parameter will be removed in v8.5. For more information, see . # The method to resolve the conflicting data. duplicate-resolution = 'remove' @@ -104,7 +104,7 @@ Conflicting data refers to two or more records with the same primary key or uniq There are two versions for conflict detection: - The new version of conflict detection, controlled by the `conflict` configuration item. -- The old version of conflict detection (deprecated in v8.0.0), controlled by the `tikv-importer.duplicate-resolution` configuration item. +- The old version of conflict detection (deprecated in v8.0.0, will be removed in v8.5), controlled by the `tikv-importer.duplicate-resolution` configuration item. ### The new version of conflict detection @@ -131,7 +131,7 @@ The new version of conflict detection controls whether to enable preprocess conf ### The old version of conflict detection (deprecated in v8.0.0) -Starting from v8.0.0, the old version of conflict detection (`tikv-importer.duplicate-resolution`) is deprecated. If `tikv-importer.duplicate-resolution` is `remove` and `conflict.strategy` is not configured, TiDB Lightning automatically enables the new version of conflict detection by assigning the value of `conflict.strategy` to `"replace"`. Note that `tikv-importer.duplicate-resolution` and `conflict.strategy` cannot be configured at the same time, as it will result in an error. +Starting from v8.0.0, the old version of conflict detection (`tikv-importer.duplicate-resolution`) is deprecated. This parameter will be removed in v8.5. If `tikv-importer.duplicate-resolution` is `remove` and `conflict.strategy` is not configured, TiDB Lightning automatically enables the new version of conflict detection by assigning the value of `conflict.strategy` to `"replace"`. Note that `tikv-importer.duplicate-resolution` and `conflict.strategy` cannot be configured at the same time, as it will result in an error. - For versions between v7.3.0 and v7.6.0, TiDB Lightning enables the old version of conflict detection when `tikv-importer.duplicate-resolution` is not an empty string. - For v7.2.0 and earlier versions, TiDB Lightning only supports the old version of conflict detection. From 7b1f0813898d4b96439662b9f61d2f803f48390b Mon Sep 17 00:00:00 2001 From: lyzx2001 Date: Wed, 27 Mar 2024 15:21:45 +0800 Subject: [PATCH 3/5] update format --- tidb-lightning/tidb-lightning-error-resolution.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tidb-lightning/tidb-lightning-error-resolution.md b/tidb-lightning/tidb-lightning-error-resolution.md index cc4f2914594c0..3185e2086ccf6 100644 --- a/tidb-lightning/tidb-lightning-error-resolution.md +++ b/tidb-lightning/tidb-lightning-error-resolution.md @@ -207,6 +207,7 @@ In this example, a data source is prepared with some known errors. [tikv-importer] backend = 'local' sorted-kv-dir = '/tmp/lightning-tmp/' + [conflict] strategy = 'replace' [mydumper] From adf220edcb18c7e54b071b67ea68f34bcdb0620a Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 27 Mar 2024 22:29:06 +0800 Subject: [PATCH 4/5] refine descriptions --- tidb-lightning/tidb-lightning-configuration.md | 2 +- tidb-lightning/tidb-lightning-error-resolution.md | 2 +- tidb-lightning/tidb-lightning-physical-import-mode-usage.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tidb-lightning/tidb-lightning-configuration.md b/tidb-lightning/tidb-lightning-configuration.md index 43aad681620cc..f04587fa1fd31 100644 --- a/tidb-lightning/tidb-lightning-configuration.md +++ b/tidb-lightning/tidb-lightning-configuration.md @@ -153,7 +153,7 @@ strategy = "" # Note that this parameter is only used in scenarios where the target table is empty. # parallel-import = false -# Starting from v8.0.0, the `duplicate-resolution` parameter is deprecated. This parameter will be removed in v8.5. For more information, see . +# The `duplicate-resolution` parameter is deprecated starting from v8.0.0 and will be removed in v8.5.0. For more information, see . # Whether to detect and resolve duplicate records (unique key conflict) in the physical import mode. # The following resolution algorithms are supported: # - none: does not detect duplicate records, which has the best performance of the two algorithms. diff --git a/tidb-lightning/tidb-lightning-error-resolution.md b/tidb-lightning/tidb-lightning-error-resolution.md index 3185e2086ccf6..524a28212935f 100644 --- a/tidb-lightning/tidb-lightning-error-resolution.md +++ b/tidb-lightning/tidb-lightning-error-resolution.md @@ -11,7 +11,7 @@ This document introduces TiDB Lightning error types, how to query the errors, an - `lightning.max-error`: the tolerance threshold of type error - `conflict.strategy`, `conflict.threshold`, and `conflict.max-record-rows`: configurations related to conflicting data -- `tikv-importer.duplicate-resolution` (deprecated in v8.0.0, will be removed in v8.5): the conflict handling configuration that can only be used in the physical import mode +- `tikv-importer.duplicate-resolution` (deprecated in v8.0.0 and will be removed in v8.5.0): the conflict handling configuration that can only be used in the physical import mode - `lightning.task-info-schema-name`: the database where conflicting data is stored when TiDB Lightning detects conflicts For more information, see [TiDB Lightning (Task)](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-task). diff --git a/tidb-lightning/tidb-lightning-physical-import-mode-usage.md b/tidb-lightning/tidb-lightning-physical-import-mode-usage.md index 32c389178ae33..6fdc71c8d02c8 100644 --- a/tidb-lightning/tidb-lightning-physical-import-mode-usage.md +++ b/tidb-lightning/tidb-lightning-physical-import-mode-usage.md @@ -46,7 +46,7 @@ strategy = "" # Import mode. "local" means using the physical import mode. backend = "local" -# Starting from v8.0.0, the `duplicate-resolution` parameter is deprecated. This parameter will be removed in v8.5. For more information, see . +# The `duplicate-resolution` parameter is deprecated starting from v8.0.0 and will be removed in v8.5.0. For more information, see . # The method to resolve the conflicting data. duplicate-resolution = 'remove' @@ -104,7 +104,7 @@ Conflicting data refers to two or more records with the same primary key or uniq There are two versions for conflict detection: - The new version of conflict detection, controlled by the `conflict` configuration item. -- The old version of conflict detection (deprecated in v8.0.0, will be removed in v8.5), controlled by the `tikv-importer.duplicate-resolution` configuration item. +- The old version of conflict detection (deprecated in v8.0.0 and will be removed in v8.5.0), controlled by the `tikv-importer.duplicate-resolution` configuration item. ### The new version of conflict detection @@ -131,7 +131,7 @@ The new version of conflict detection controls whether to enable preprocess conf ### The old version of conflict detection (deprecated in v8.0.0) -Starting from v8.0.0, the old version of conflict detection (`tikv-importer.duplicate-resolution`) is deprecated. This parameter will be removed in v8.5. If `tikv-importer.duplicate-resolution` is `remove` and `conflict.strategy` is not configured, TiDB Lightning automatically enables the new version of conflict detection by assigning the value of `conflict.strategy` to `"replace"`. Note that `tikv-importer.duplicate-resolution` and `conflict.strategy` cannot be configured at the same time, as it will result in an error. +Starting from v8.0.0, the old version of conflict detection (`tikv-importer.duplicate-resolution`) is deprecated. The `tikv-importer.duplicate-resolution` parameter will be removed in v8.5.0. If `tikv-importer.duplicate-resolution` is `remove` and `conflict.strategy` is not configured, TiDB Lightning automatically enables the new version of conflict detection by assigning the value of `conflict.strategy` to `"replace"`. Note that `tikv-importer.duplicate-resolution` and `conflict.strategy` cannot be configured at the same time, as it will result in an error. - For versions between v7.3.0 and v7.6.0, TiDB Lightning enables the old version of conflict detection when `tikv-importer.duplicate-resolution` is not an empty string. - For v7.2.0 and earlier versions, TiDB Lightning only supports the old version of conflict detection. From 07d33b84e5d5484e730fcb1e5c3fc5b8e7a818bf Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 28 Mar 2024 10:27:31 +0800 Subject: [PATCH 5/5] Apply suggestions from code review --- tidb-lightning/tidb-lightning-configuration.md | 2 +- tidb-lightning/tidb-lightning-error-resolution.md | 2 +- tidb-lightning/tidb-lightning-physical-import-mode-usage.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tidb-lightning/tidb-lightning-configuration.md b/tidb-lightning/tidb-lightning-configuration.md index f04587fa1fd31..59ec10b04bb95 100644 --- a/tidb-lightning/tidb-lightning-configuration.md +++ b/tidb-lightning/tidb-lightning-configuration.md @@ -153,7 +153,7 @@ strategy = "" # Note that this parameter is only used in scenarios where the target table is empty. # parallel-import = false -# The `duplicate-resolution` parameter is deprecated starting from v8.0.0 and will be removed in v8.5.0. For more information, see . +# The `duplicate-resolution` parameter is deprecated starting from v8.0.0 and will be removed in a future release. For more information, see . # Whether to detect and resolve duplicate records (unique key conflict) in the physical import mode. # The following resolution algorithms are supported: # - none: does not detect duplicate records, which has the best performance of the two algorithms. diff --git a/tidb-lightning/tidb-lightning-error-resolution.md b/tidb-lightning/tidb-lightning-error-resolution.md index 524a28212935f..21fb3b56640f3 100644 --- a/tidb-lightning/tidb-lightning-error-resolution.md +++ b/tidb-lightning/tidb-lightning-error-resolution.md @@ -11,7 +11,7 @@ This document introduces TiDB Lightning error types, how to query the errors, an - `lightning.max-error`: the tolerance threshold of type error - `conflict.strategy`, `conflict.threshold`, and `conflict.max-record-rows`: configurations related to conflicting data -- `tikv-importer.duplicate-resolution` (deprecated in v8.0.0 and will be removed in v8.5.0): the conflict handling configuration that can only be used in the physical import mode +- `tikv-importer.duplicate-resolution` (deprecated in v8.0.0 and will be removed in a future release): the conflict handling configuration that can only be used in the physical import mode - `lightning.task-info-schema-name`: the database where conflicting data is stored when TiDB Lightning detects conflicts For more information, see [TiDB Lightning (Task)](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-task). diff --git a/tidb-lightning/tidb-lightning-physical-import-mode-usage.md b/tidb-lightning/tidb-lightning-physical-import-mode-usage.md index 6fdc71c8d02c8..a9682462f46c4 100644 --- a/tidb-lightning/tidb-lightning-physical-import-mode-usage.md +++ b/tidb-lightning/tidb-lightning-physical-import-mode-usage.md @@ -46,7 +46,7 @@ strategy = "" # Import mode. "local" means using the physical import mode. backend = "local" -# The `duplicate-resolution` parameter is deprecated starting from v8.0.0 and will be removed in v8.5.0. For more information, see . +# The `duplicate-resolution` parameter is deprecated starting from v8.0.0 and will be removed in a future release. For more information, see . # The method to resolve the conflicting data. duplicate-resolution = 'remove' @@ -104,7 +104,7 @@ Conflicting data refers to two or more records with the same primary key or uniq There are two versions for conflict detection: - The new version of conflict detection, controlled by the `conflict` configuration item. -- The old version of conflict detection (deprecated in v8.0.0 and will be removed in v8.5.0), controlled by the `tikv-importer.duplicate-resolution` configuration item. +- The old version of conflict detection (deprecated in v8.0.0 and will be removed in a future release), controlled by the `tikv-importer.duplicate-resolution` configuration item. ### The new version of conflict detection @@ -131,7 +131,7 @@ The new version of conflict detection controls whether to enable preprocess conf ### The old version of conflict detection (deprecated in v8.0.0) -Starting from v8.0.0, the old version of conflict detection (`tikv-importer.duplicate-resolution`) is deprecated. The `tikv-importer.duplicate-resolution` parameter will be removed in v8.5.0. If `tikv-importer.duplicate-resolution` is `remove` and `conflict.strategy` is not configured, TiDB Lightning automatically enables the new version of conflict detection by assigning the value of `conflict.strategy` to `"replace"`. Note that `tikv-importer.duplicate-resolution` and `conflict.strategy` cannot be configured at the same time, as it will result in an error. +Starting from v8.0.0, the old version of conflict detection (`tikv-importer.duplicate-resolution`) is deprecated. The `tikv-importer.duplicate-resolution` parameter will be removed in a future release. If `tikv-importer.duplicate-resolution` is `remove` and `conflict.strategy` is not configured, TiDB Lightning automatically enables the new version of conflict detection by assigning the value of `conflict.strategy` to `"replace"`. Note that `tikv-importer.duplicate-resolution` and `conflict.strategy` cannot be configured at the same time, as it will result in an error. - For versions between v7.3.0 and v7.6.0, TiDB Lightning enables the old version of conflict detection when `tikv-importer.duplicate-resolution` is not an empty string. - For v7.2.0 and earlier versions, TiDB Lightning only supports the old version of conflict detection.