From 070feaab027519f59d669060b8fb7999885b3bdf Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Fri, 26 Jul 2024 15:41:36 +0800 Subject: [PATCH 1/6] Add temp.md --- temp.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 temp.md diff --git a/temp.md b/temp.md new file mode 100644 index 0000000000000..af27ff4986a7b --- /dev/null +++ b/temp.md @@ -0,0 +1 @@ +This is a test file. \ No newline at end of file From c37af0064aa951f2877accb232c6703a97ece8e1 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Fri, 26 Jul 2024 17:15:29 +0800 Subject: [PATCH 2/6] Delete temp.md --- temp.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 temp.md diff --git a/temp.md b/temp.md deleted file mode 100644 index af27ff4986a7b..0000000000000 --- a/temp.md +++ /dev/null @@ -1 +0,0 @@ -This is a test file. \ No newline at end of file From 3a2b69fc68a4c3ee575a6ac913e04c3ff5207f8b Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 20 Aug 2024 16:03:31 +0800 Subject: [PATCH 3/6] Refine descriptions for completeness and clarity --- system-variables.md | 2 +- tidb-configuration-file.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/system-variables.md b/system-variables.md index c6c7c9171fc6b..d3735c33d4144 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5264,7 +5264,7 @@ Query OK, 0 rows affected, 1 warning (0.00 sec) - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds -- This variable is used to output the threshold value of the time consumed by the slow log. When the time consumed by a query is larger than this value, this query is considered as a slow log and its log is output to the slow query log. +- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](/tidb-configuration-file.md#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. ### tidb_slow_query_file diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index e8a6a80df4ecc..40f544923b622 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -309,7 +309,7 @@ Configuration items related to log. - Outputs the threshold value of consumed time in the slow log. - Default value: `300` - Unit: Milliseconds -- If the value in a query is larger than the default value, it is a slow query and is output to the slow log. +- When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. - Since v6.1.0, the threshold value of consumed time in the slow log is specified by the TiDB configuration item [`instance.tidb_slow_log_threshold`](/tidb-configuration-file.md#tidb_slow_log_threshold) or the system variable [`tidb_slow_log_threshold`](/system-variables.md#tidb_slow_log_threshold). `slow-threshold` still takes effect. But if `slow-threshold` and `instance.tidb_slow_log_threshold` are set at the same time, the latter takes effect. ### `record-plan-in-slow-log` @@ -904,10 +904,11 @@ Configuration items related to read isolation. ### `tidb_slow_log_threshold` -- This configuration is used to output the threshold value of the time consumed by the slow log. When the time consumed by a query is larger than this value, this query is considered as a slow log and its log is output to the slow query log. +- This configuration is used to output the threshold value of the time consumed by the slow log. - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds +- When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. - Before v6.1.0, this configuration is set by `slow-threshold`. ### `in-mem-slow-query-topn-num` New in v7.3.0 From badb490840c8e6c86684be1e2d3f7f3ac4c472ae Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 20 Aug 2024 16:16:20 +0800 Subject: [PATCH 4/6] Update link for check --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index d3735c33d4144..92228af39ad2b 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5264,7 +5264,7 @@ Query OK, 0 rows affected, 1 warning (0.00 sec) - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds -- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](/tidb-configuration-file.md#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. +- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. ### tidb_slow_query_file From 3548c5800d5ee91489ab9ad9c13211f860c8992b Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 20 Aug 2024 16:21:41 +0800 Subject: [PATCH 5/6] Update wording for consistency --- tidb-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 40f544923b622..81889360738be 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -904,7 +904,7 @@ Configuration items related to read isolation. ### `tidb_slow_log_threshold` -- This configuration is used to output the threshold value of the time consumed by the slow log. +- Outputs the threshold value of the time consumed by the slow log. - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds From 47ad49df2b15d56b7ae46ee87dd5b1905e0d4281 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Tue, 20 Aug 2024 16:52:55 +0800 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Grace Cai --- system-variables.md | 2 +- tidb-configuration-file.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system-variables.md b/system-variables.md index 92228af39ad2b..d0d02b98e9e38 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5264,7 +5264,7 @@ Query OK, 0 rows affected, 1 warning (0.00 sec) - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds -- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. +- This variable outputs the threshold value of the time consumed by the slow log, and is set to 300 milliseconds by default. When the time consumed by a query is larger than this value, this query is considered as a slow query and its log is output to the slow query log. Note that when the output level of [`log.level`](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this variable. ### tidb_slow_query_file diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 81889360738be..12cf88fd9132d 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -309,7 +309,7 @@ Configuration items related to log. - Outputs the threshold value of consumed time in the slow log. - Default value: `300` - Unit: Milliseconds -- When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. +- When the time consumed by a query is larger than this value, this query is considered as a slow query and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. - Since v6.1.0, the threshold value of consumed time in the slow log is specified by the TiDB configuration item [`instance.tidb_slow_log_threshold`](/tidb-configuration-file.md#tidb_slow_log_threshold) or the system variable [`tidb_slow_log_threshold`](/system-variables.md#tidb_slow_log_threshold). `slow-threshold` still takes effect. But if `slow-threshold` and `instance.tidb_slow_log_threshold` are set at the same time, the latter takes effect. ### `record-plan-in-slow-log` @@ -908,7 +908,7 @@ Configuration items related to read isolation. - Default value: `300` - Range: `[-1, 9223372036854775807]` - Unit: Milliseconds -- When the time consumed by a query is larger than this value, this query is considered as a slow query log and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. +- When the time consumed by a query is larger than this value, this query is considered as a slow query and its log is output to the slow query log. Note that when the output level of [`log.level`](#level) is `"debug"`, all queries are recorded in the slow query log, regardless of the setting of this parameter. - Before v6.1.0, this configuration is set by `slow-threshold`. ### `in-mem-slow-query-topn-num` New in v7.3.0