From 9fa9d0a3df095a9f7b3e31f869e553c2aec87132 Mon Sep 17 00:00:00 2001 From: Joyinqin Date: Thu, 25 Mar 2021 11:53:13 +0800 Subject: [PATCH 1/8] update load base split config --- configure-load-base-split.md | 4 ++-- dynamic-config.md | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure-load-base-split.md b/configure-load-base-split.md index 1c85dcb0214ca..907964466be24 100644 --- a/configure-load-base-split.md +++ b/configure-load-base-split.md @@ -29,9 +29,9 @@ The Region split by Load Base Split will not be merged quickly. On the one hand, ## Usage -The Load Base Split feature is currently controlled by the `split.qps-threshold` parameter. If the sum of all types of read requests per second for a Region exceeds the value of `split.qps-threshold` for 10 seconds on end, split the Region. +The Load Base Split feature is currently controlled by the `split.qps-threshold` parameter (QPS threshold) and `split.byte-threshold` parameter (traffic threshold). If the sum of all types of read requests per second for a Region exceeds the QPS threshold or traffic threshold for 10 consecutive seconds, split the Region. -Load Base Split is enabled by default, but the parameter is set to a rather high value, defaulting to `3000`. If you want to disable this feature, set the threshold high enough. +Load Base Split is enabled by default, but the parameter is set to a rather high value. `split.qps-threshold` defaults to `3000` and `split.byte-threshold` defaults to 30MB/s. If you want to disable these two features, set the threshold high enough. To modify the parameter, take either of the following two methods: diff --git a/dynamic-config.md b/dynamic-config.md index 6d9930d86ce68..14a6876be44ed 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -192,9 +192,10 @@ The following TiKV configuration items can be modified online: | `{db-name}.{cf-name}.titan.blob-run-mode` | The mode of processing blob files | | `storage.block-cache.capacity` | The size of shared block cache (supported since v4.0.3) | | `backup.num-threads` | The number of backup threads (supported since v4.0.3) | -| `split.qps-threshold` | The threshold to execute `load-base-split` on a Region. If the read QPS is higher than this value for 10 consecutive seconds, this Region should be split. | -| `split.split-balance-score` | The parameter of `load-base-split`, which ensures the load of the two split Regions is as balanced as possible | -| `split.split-contained-score` | The parameter of `load-base-split`, which reduces the cross-Region visits after split as much as possible | +| `split.qps-threshold` | The threshold to execute `load-base-split` on a Region. If the QPS of a read request for a Region exceeds the QPS threshold for a consecutive period of time, this Region should be split.| +| `split.byte-threshold` | The threshold to execute `load-base-split` on a Region. If the traffic of a read request for a Region exceeds the byte-threshold for a consecutive period of time, this Region should be split. | +| `split.split-balance-score` | The parameter of `load-base-split`, which ensures the load of the two split Regions is as balanced as possible. The smaller the value is, the more balanced the load is, but it may also cause the split failure. | +| `split.split-contained-score` | The parameter of `load-base-split`. The smaller the value, the fewer cross-Region visits after Region split. | In the table above, parameters with the `{db-name}` or `{db-name}.{cf-name}` prefix are configurations related to RocksDB. The optional values of `db-name` are `rocksdb` and `raftdb`. From 40c169d8347aad6907e85ab9ba6e8b830b58a387 Mon Sep 17 00:00:00 2001 From: Joyinqin Date: Thu, 25 Mar 2021 13:38:37 +0800 Subject: [PATCH 2/8] Update dynamic-config.md --- dynamic-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamic-config.md b/dynamic-config.md index 14a6876be44ed..b293351fcb30a 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -194,7 +194,7 @@ The following TiKV configuration items can be modified online: | `backup.num-threads` | The number of backup threads (supported since v4.0.3) | | `split.qps-threshold` | The threshold to execute `load-base-split` on a Region. If the QPS of a read request for a Region exceeds the QPS threshold for a consecutive period of time, this Region should be split.| | `split.byte-threshold` | The threshold to execute `load-base-split` on a Region. If the traffic of a read request for a Region exceeds the byte-threshold for a consecutive period of time, this Region should be split. | -| `split.split-balance-score` | The parameter of `load-base-split`, which ensures the load of the two split Regions is as balanced as possible. The smaller the value is, the more balanced the load is, but it may also cause the split failure. | +| `split.split-balance-score` | The parameter of `load-base-split`, which ensures the load of the two split Regions is as balanced as possible. The smaller the value is, the more balanced the load is, but it might also cause the split failure. | | `split.split-contained-score` | The parameter of `load-base-split`. The smaller the value, the fewer cross-Region visits after Region split. | In the table above, parameters with the `{db-name}` or `{db-name}.{cf-name}` prefix are configurations related to RocksDB. The optional values of `db-name` are `rocksdb` and `raftdb`. From cf62ee224b1e813bfa84632648a37d900c69fcff Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Fri, 26 Mar 2021 09:45:57 +0800 Subject: [PATCH 3/8] Apply suggestions from code review Co-authored-by: Ran --- configure-load-base-split.md | 4 ++-- dynamic-config.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure-load-base-split.md b/configure-load-base-split.md index 907964466be24..026720d8bd2ae 100644 --- a/configure-load-base-split.md +++ b/configure-load-base-split.md @@ -29,9 +29,9 @@ The Region split by Load Base Split will not be merged quickly. On the one hand, ## Usage -The Load Base Split feature is currently controlled by the `split.qps-threshold` parameter (QPS threshold) and `split.byte-threshold` parameter (traffic threshold). If the sum of all types of read requests per second for a Region exceeds the QPS threshold or traffic threshold for 10 consecutive seconds, split the Region. +The Load Base Split feature is currently controlled by the `split.qps-threshold` parameter (QPS threshold) and `split.byte-threshold` parameter (traffic threshold). If the sum of all types of read requests per second for a Region exceeds the QPS threshold or traffic threshold for 10 consecutive seconds, PD splits the Region. -Load Base Split is enabled by default, but the parameter is set to a rather high value. `split.qps-threshold` defaults to `3000` and `split.byte-threshold` defaults to 30MB/s. If you want to disable these two features, set the threshold high enough. +Load Base Split is enabled by default, but the parameter is set to a rather high value. `split.qps-threshold` defaults to `3000` and `split.byte-threshold` defaults to 30MB/s. If you want to disable this feature, set the two thresholds high enough. To modify the parameter, take either of the following two methods: diff --git a/dynamic-config.md b/dynamic-config.md index b293351fcb30a..24989967d7570 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -192,9 +192,9 @@ The following TiKV configuration items can be modified online: | `{db-name}.{cf-name}.titan.blob-run-mode` | The mode of processing blob files | | `storage.block-cache.capacity` | The size of shared block cache (supported since v4.0.3) | | `backup.num-threads` | The number of backup threads (supported since v4.0.3) | -| `split.qps-threshold` | The threshold to execute `load-base-split` on a Region. If the QPS of a read request for a Region exceeds the QPS threshold for a consecutive period of time, this Region should be split.| -| `split.byte-threshold` | The threshold to execute `load-base-split` on a Region. If the traffic of a read request for a Region exceeds the byte-threshold for a consecutive period of time, this Region should be split. | -| `split.split-balance-score` | The parameter of `load-base-split`, which ensures the load of the two split Regions is as balanced as possible. The smaller the value is, the more balanced the load is, but it might also cause the split failure. | +| `split.qps-threshold` | The threshold to execute `load-base-split` on a Region. If the QPS of read requests for a Region exceeds `qps-threshold` for a consecutive period of time, this Region should be split.| +| `split.byte-threshold` | The threshold to execute `load-base-split` on a Region. If the traffic of read requests for a Region exceeds the `byte-threshold` for a consecutive period of time, this Region should be split. | +| `split.split-balance-score` | The parameter of `load-base-split`, which ensures the load of the two split Regions is as balanced as possible. The smaller the value is, the more balanced the load is. But setting it too small might cause the split failure. | | `split.split-contained-score` | The parameter of `load-base-split`. The smaller the value, the fewer cross-Region visits after Region split. | In the table above, parameters with the `{db-name}` or `{db-name}.{cf-name}` prefix are configurations related to RocksDB. The optional values of `db-name` are `rocksdb` and `raftdb`. From bfbaade0a1c3175994d4f8fbd949a848892e307c Mon Sep 17 00:00:00 2001 From: Joyinqin Date: Fri, 26 Mar 2021 10:00:06 +0800 Subject: [PATCH 4/8] Update tidb-configuration-file.md --- tidb-configuration-file.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index a617634c991d2..7327244497215 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -94,6 +94,10 @@ The TiDB configuration file supports more options than command-line parameters. - Default value: `false` - With this default setting, adding or removing the primary key constraint is not supported. You can enable this feature by setting `alter-primary-key` to `true`. However, if a table already exists before the switch is on, and the data type of its primary key column is an integer, dropping the primary key from the column is not possible even if you set this configuration item to `true`. +> **Note:** +> +> This configuration item has been deprecated, and currently only takes effect when the value of `@tidb_enable_clustered_index` is `INT_ONLY`.If you need to add or remove the primary key, use the `NONCLUSTERED` keyword instead when creating the table. For more details about the primary key of the `CLUSTERED` type, refer to [clustered index](/clustered-indexes.md). + ### `server-version` + Modifies the version string returned by TiDB in the following situations: From 57b568461520ec1ea770dbf1abbbb55668e632e7 Mon Sep 17 00:00:00 2001 From: Joyinqin Date: Fri, 26 Mar 2021 10:01:48 +0800 Subject: [PATCH 5/8] Revert "Update tidb-configuration-file.md" This reverts commit bfbaade0a1c3175994d4f8fbd949a848892e307c. --- tidb-configuration-file.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 7327244497215..a617634c991d2 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -94,10 +94,6 @@ The TiDB configuration file supports more options than command-line parameters. - Default value: `false` - With this default setting, adding or removing the primary key constraint is not supported. You can enable this feature by setting `alter-primary-key` to `true`. However, if a table already exists before the switch is on, and the data type of its primary key column is an integer, dropping the primary key from the column is not possible even if you set this configuration item to `true`. -> **Note:** -> -> This configuration item has been deprecated, and currently only takes effect when the value of `@tidb_enable_clustered_index` is `INT_ONLY`.If you need to add or remove the primary key, use the `NONCLUSTERED` keyword instead when creating the table. For more details about the primary key of the `CLUSTERED` type, refer to [clustered index](/clustered-indexes.md). - ### `server-version` + Modifies the version string returned by TiDB in the following situations: From 3415d2970ff5b985989ebda0ad605d08b248e7b8 Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Fri, 26 Mar 2021 11:26:02 +0800 Subject: [PATCH 6/8] Apply suggestions from code review Co-authored-by: lhy1024 --- configure-load-base-split.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure-load-base-split.md b/configure-load-base-split.md index 026720d8bd2ae..b0508e72e3b87 100644 --- a/configure-load-base-split.md +++ b/configure-load-base-split.md @@ -31,7 +31,7 @@ The Region split by Load Base Split will not be merged quickly. On the one hand, The Load Base Split feature is currently controlled by the `split.qps-threshold` parameter (QPS threshold) and `split.byte-threshold` parameter (traffic threshold). If the sum of all types of read requests per second for a Region exceeds the QPS threshold or traffic threshold for 10 consecutive seconds, PD splits the Region. -Load Base Split is enabled by default, but the parameter is set to a rather high value. `split.qps-threshold` defaults to `3000` and `split.byte-threshold` defaults to 30MB/s. If you want to disable this feature, set the two thresholds high enough. +Load Base Split is enabled by default, but the parameter is set to a rather high value. `split.qps-threshold` defaults to `3000` and `split.byte-threshold` defaults to 30MB/s. If you want to disable this feature, set the two thresholds high enough at the same. To modify the parameter, take either of the following two methods: From 08e8b2d3b53af71832ebce4d5f908d5344af4db7 Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Fri, 26 Mar 2021 11:26:20 +0800 Subject: [PATCH 7/8] Apply suggestions from code review Co-authored-by: Ran --- dynamic-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamic-config.md b/dynamic-config.md index 24989967d7570..bbf08562a19ab 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -194,7 +194,7 @@ The following TiKV configuration items can be modified online: | `backup.num-threads` | The number of backup threads (supported since v4.0.3) | | `split.qps-threshold` | The threshold to execute `load-base-split` on a Region. If the QPS of read requests for a Region exceeds `qps-threshold` for a consecutive period of time, this Region should be split.| | `split.byte-threshold` | The threshold to execute `load-base-split` on a Region. If the traffic of read requests for a Region exceeds the `byte-threshold` for a consecutive period of time, this Region should be split. | -| `split.split-balance-score` | The parameter of `load-base-split`, which ensures the load of the two split Regions is as balanced as possible. The smaller the value is, the more balanced the load is. But setting it too small might cause the split failure. | +| `split.split-balance-score` | The parameter of `load-base-split`, which ensures the load of the two split Regions is as balanced as possible. The smaller the value is, the more balanced the load is. But setting it too small might cause split failure. | | `split.split-contained-score` | The parameter of `load-base-split`. The smaller the value, the fewer cross-Region visits after Region split. | In the table above, parameters with the `{db-name}` or `{db-name}.{cf-name}` prefix are configurations related to RocksDB. The optional values of `db-name` are `rocksdb` and `raftdb`. From 6a39b61753e5d0dd8b7755acc6410c5afadbb92a Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Fri, 26 Mar 2021 11:28:04 +0800 Subject: [PATCH 8/8] Apply suggestions from code review Co-authored-by: Ran --- configure-load-base-split.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure-load-base-split.md b/configure-load-base-split.md index b0508e72e3b87..1e264047bdb09 100644 --- a/configure-load-base-split.md +++ b/configure-load-base-split.md @@ -31,7 +31,7 @@ The Region split by Load Base Split will not be merged quickly. On the one hand, The Load Base Split feature is currently controlled by the `split.qps-threshold` parameter (QPS threshold) and `split.byte-threshold` parameter (traffic threshold). If the sum of all types of read requests per second for a Region exceeds the QPS threshold or traffic threshold for 10 consecutive seconds, PD splits the Region. -Load Base Split is enabled by default, but the parameter is set to a rather high value. `split.qps-threshold` defaults to `3000` and `split.byte-threshold` defaults to 30MB/s. If you want to disable this feature, set the two thresholds high enough at the same. +Load Base Split is enabled by default, but the parameter is set to a rather high value. `split.qps-threshold` defaults to `3000` and `split.byte-threshold` defaults to 30MB/s. If you want to disable this feature, set the two thresholds high enough at the same time. To modify the parameter, take either of the following two methods: