From 5a42fbdf91327021942ad9f41c4baca2a39addf3 Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Wed, 6 Apr 2022 11:18:18 +0800 Subject: [PATCH 01/13] TiKV config: add warnings about `enable-ttl` --- tikv-configuration-file.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 686835679953e..c1c5c9f53f9bb 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -369,7 +369,13 @@ Configuration items related to storage. ### `enable-ttl` + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. -+ Note: The TTL feature is only available for the RawKV interface for now. You can only configure this feature when creating a new cluster because TTL uses different data formats in the storage layer. If you modify this item on an existing cluster, TiKV reports errors when it starts. + +> **Warning:** +> +> - The TTL feature is only available for the RawKV interface for now. You can only configure this feature when creating a new cluster because TTL uses different data formats in the storage layer. +> - You **must not** modify this item on an existing cluster. Otherwise, TiKV reports errors when it starts. +> - You **must not** use this item on a cluster with TiDB nodes. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. + + Default value: `false` ### `ttl-check-poll-interval` From a0bfdf29b74f816318bfa2040de3ccbd5b1de642 Mon Sep 17 00:00:00 2001 From: Enwei Date: Wed, 6 Apr 2022 11:31:01 +0800 Subject: [PATCH 02/13] revise the order of the warning part --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index c1c5c9f53f9bb..d1ae3ba388198 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -369,6 +369,7 @@ Configuration items related to storage. ### `enable-ttl` + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. ++ Default value: `false` > **Warning:** > @@ -376,7 +377,6 @@ Configuration items related to storage. > - You **must not** modify this item on an existing cluster. Otherwise, TiKV reports errors when it starts. > - You **must not** use this item on a cluster with TiDB nodes. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. -+ Default value: `false` ### `ttl-check-poll-interval` From 5d2aea63d095735caf5f11f39f648b0a601ba2d5 Mon Sep 17 00:00:00 2001 From: Enwei Date: Wed, 6 Apr 2022 11:31:44 +0800 Subject: [PATCH 03/13] remove an extra line --- tikv-configuration-file.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index d1ae3ba388198..2cee18a7fb8fd 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -376,8 +376,6 @@ Configuration items related to storage. > - The TTL feature is only available for the RawKV interface for now. You can only configure this feature when creating a new cluster because TTL uses different data formats in the storage layer. > - You **must not** modify this item on an existing cluster. Otherwise, TiKV reports errors when it starts. > - You **must not** use this item on a cluster with TiDB nodes. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. - - ### `ttl-check-poll-interval` + The interval of checking data to reclaim physical spaces. If data reaches its TTL, TiKV forcibly reclaims its physical space during the check. From 6bfedf0a3ca41dc55a246cf1c951e3f4ccc09702 Mon Sep 17 00:00:00 2001 From: Enwei Date: Wed, 6 Apr 2022 11:32:17 +0800 Subject: [PATCH 04/13] Update tikv-configuration-file.md --- tikv-configuration-file.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 2cee18a7fb8fd..24bb0a94a28bb 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -376,6 +376,7 @@ Configuration items related to storage. > - The TTL feature is only available for the RawKV interface for now. You can only configure this feature when creating a new cluster because TTL uses different data formats in the storage layer. > - You **must not** modify this item on an existing cluster. Otherwise, TiKV reports errors when it starts. > - You **must not** use this item on a cluster with TiDB nodes. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. + ### `ttl-check-poll-interval` + The interval of checking data to reclaim physical spaces. If data reaches its TTL, TiKV forcibly reclaims its physical space during the check. From cf3e50dfb1a25078046cd90e0e4e631a15947079 Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Wed, 6 Apr 2022 11:52:48 +0800 Subject: [PATCH 05/13] revise orders --- tikv-configuration-file.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 24bb0a94a28bb..c35a5806df859 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -368,15 +368,15 @@ Configuration items related to storage. ### `enable-ttl` -+ TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. -+ Default value: `false` - > **Warning:** > > - The TTL feature is only available for the RawKV interface for now. You can only configure this feature when creating a new cluster because TTL uses different data formats in the storage layer. > - You **must not** modify this item on an existing cluster. Otherwise, TiKV reports errors when it starts. > - You **must not** use this item on a cluster with TiDB nodes. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. ++ TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. ++ Default value: `false` + ### `ttl-check-poll-interval` + The interval of checking data to reclaim physical spaces. If data reaches its TTL, TiKV forcibly reclaims its physical space during the check. From 53d80fb656ffbc654f2934f197af6fbb21a1cee2 Mon Sep 17 00:00:00 2001 From: Enwei Date: Wed, 6 Apr 2022 15:51:10 +0800 Subject: [PATCH 06/13] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- tikv-configuration-file.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index c35a5806df859..f8c1ffaffafcf 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -370,9 +370,9 @@ Configuration items related to storage. > **Warning:** > -> - The TTL feature is only available for the RawKV interface for now. You can only configure this feature when creating a new cluster because TTL uses different data formats in the storage layer. -> - You **must not** modify this item on an existing cluster. Otherwise, TiKV reports errors when it starts. -> - You **must not** use this item on a cluster with TiDB nodes. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. +> - Currently, the TTL feature is available for the RawKV interface only. You can configure TTL **ONLY WHEN** creating a new cluster because TTL uses different data formats in the storage layer. +> - **DO NOT** modify this configuration item on an existing cluster. Otherwise, TiKV reports errors when it starts. +> - **DO NOT** use this configuration item on a cluster with TiDB nodes. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. + Default value: `false` From 72c1f3a9c95b6e95614848f337f90858d3b0efdb Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Thu, 7 Apr 2022 18:53:35 +0800 Subject: [PATCH 07/13] update translations according to Chinese contents --- tikv-configuration-file.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index f8c1ffaffafcf..0337a7b8da391 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -370,9 +370,8 @@ Configuration items related to storage. > **Warning:** > -> - Currently, the TTL feature is available for the RawKV interface only. You can configure TTL **ONLY WHEN** creating a new cluster because TTL uses different data formats in the storage layer. -> - **DO NOT** modify this configuration item on an existing cluster. Otherwise, TiKV reports errors when it starts. -> - **DO NOT** use this configuration item on a cluster with TiDB nodes. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. +> - You can set the value of `enable-ttl` to `true` or `false` **only when** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item for an existing TiKV cluster. The data stored in TiKV clusters that configure this item to `true` and `false` has different formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, causing TiKV to report "can't enable ttl on a non-ttl" error when you restart the TiKV cluster. +> - You can use `enable-ttl` in a TiKV cluster only. **DO NOT** use this configuration item in a cluster with TiDB nodes, which means setting `enable-ttl` to `true` in such clusters. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. + Default value: `false` From 6ce0f8a9670dc4671c9043c53541b139558d8f60 Mon Sep 17 00:00:00 2001 From: Enwei Date: Thu, 7 Apr 2022 18:54:38 +0800 Subject: [PATCH 08/13] Apply suggestions from code review --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 0337a7b8da391..61daa30d22006 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -370,7 +370,7 @@ Configuration items related to storage. > **Warning:** > -> - You can set the value of `enable-ttl` to `true` or `false` **only when** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item for an existing TiKV cluster. The data stored in TiKV clusters that configure this item to `true` and `false` has different formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, causing TiKV to report "can't enable ttl on a non-ttl" error when you restart the TiKV cluster. +> - You can set the value of `enable-ttl` to `true` or `false` **only when** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item for an existing TiKV cluster. The data stored in TiKV clusters that configure this item to `true` and `false` has different formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, causing TiKV to report the "can't enable ttl on a non-ttl" error when you restart the TiKV cluster. > - You can use `enable-ttl` in a TiKV cluster only. **DO NOT** use this configuration item in a cluster with TiDB nodes, which means setting `enable-ttl` to `true` in such clusters. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. From 1349aba5f3cbea410a075cbe1d8eb71491ef6f2a Mon Sep 17 00:00:00 2001 From: Enwei Date: Mon, 11 Apr 2022 11:16:48 +0800 Subject: [PATCH 09/13] Apply suggestions from code review --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 61daa30d22006..6c31208423c24 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -370,7 +370,7 @@ Configuration items related to storage. > **Warning:** > -> - You can set the value of `enable-ttl` to `true` or `false` **only when** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item for an existing TiKV cluster. The data stored in TiKV clusters that configure this item to `true` and `false` has different formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, causing TiKV to report the "can't enable ttl on a non-ttl" error when you restart the TiKV cluster. +> - You can set the value of `enable-ttl` to `true` or `false` **only when** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item for an existing TiKV cluster. The data stored in TiKV clusters configured this item to `true` and `false` has different formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, causing TiKV to report the "can't enable ttl on a non-ttl" error when you restart the TiKV cluster. > - You can use `enable-ttl` in a TiKV cluster only. **DO NOT** use this configuration item in a cluster with TiDB nodes, which means setting `enable-ttl` to `true` in such clusters. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. From e50704867238dbd5c387a846296dc002f94cb0bd Mon Sep 17 00:00:00 2001 From: Enwei Date: Tue, 12 Apr 2022 11:36:54 +0800 Subject: [PATCH 10/13] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- tikv-configuration-file.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 6c31208423c24..7c765d1c22480 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -370,8 +370,8 @@ Configuration items related to storage. > **Warning:** > -> - You can set the value of `enable-ttl` to `true` or `false` **only when** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item for an existing TiKV cluster. The data stored in TiKV clusters configured this item to `true` and `false` has different formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, causing TiKV to report the "can't enable ttl on a non-ttl" error when you restart the TiKV cluster. -> - You can use `enable-ttl` in a TiKV cluster only. **DO NOT** use this configuration item in a cluster with TiDB nodes, which means setting `enable-ttl` to `true` in such clusters. Otherwise, serious consequences might occur, such as data corruption and the upgrade failure of TiDB clusters. +> - Set the value of `enable-ttl` to `true` or `false` **ONLY WHEN** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item in an existing TiKV cluster. TiKV clusters with different `enable-ttl` values use different data formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, which causes the "can't enable TTL on a non-ttl" error when you restart the TiKV cluster. +> - Use `enable-ttl` **ONLY IN** a TiKV cluster. **DO NOT** use this configuration item in a cluster that has TiDB nodes (which means setting `enable-ttl` to `true` in such clusters). Otherwise, critical issues such as data corruption and the upgrade failure of TiDB clusters will occur. + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. + Default value: `false` From 402f6c45386095092636578bae083fe68b78913c Mon Sep 17 00:00:00 2001 From: Enwei Date: Tue, 12 Apr 2022 11:37:39 +0800 Subject: [PATCH 11/13] Apply suggestions from code review --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 7c765d1c22480..72ee6441277bc 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -370,7 +370,7 @@ Configuration items related to storage. > **Warning:** > -> - Set the value of `enable-ttl` to `true` or `false` **ONLY WHEN** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item in an existing TiKV cluster. TiKV clusters with different `enable-ttl` values use different data formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, which causes the "can't enable TTL on a non-ttl" error when you restart the TiKV cluster. +> - Set `enable-ttl` **ONLY WHEN** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item in an existing TiKV cluster. TiKV clusters with different `enable-ttl` values use different data formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, which causes the "can't enable TTL on a non-ttl" error when you restart the TiKV cluster. > - Use `enable-ttl` **ONLY IN** a TiKV cluster. **DO NOT** use this configuration item in a cluster that has TiDB nodes (which means setting `enable-ttl` to `true` in such clusters). Otherwise, critical issues such as data corruption and the upgrade failure of TiDB clusters will occur. + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. From 28725dc7d212b11b4522fca06573969f9ae1f915 Mon Sep 17 00:00:00 2001 From: Enwei Date: Tue, 12 Apr 2022 11:43:15 +0800 Subject: [PATCH 12/13] Apply suggestions from code review --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 72ee6441277bc..d289c10b40143 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -370,7 +370,7 @@ Configuration items related to storage. > **Warning:** > -> - Set `enable-ttl` **ONLY WHEN** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item in an existing TiKV cluster. TiKV clusters with different `enable-ttl` values use different data formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, which causes the "can't enable TTL on a non-ttl" error when you restart the TiKV cluster. +> - Set `enable-ttl` value to `true` or `false` **ONLY WHEN** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item in an existing TiKV cluster. TiKV clusters with different `enable-ttl` values use different data formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, which causes the "can't enable TTL on a non-ttl" error when you restart the TiKV cluster. > - Use `enable-ttl` **ONLY IN** a TiKV cluster. **DO NOT** use this configuration item in a cluster that has TiDB nodes (which means setting `enable-ttl` to `true` in such clusters). Otherwise, critical issues such as data corruption and the upgrade failure of TiDB clusters will occur. + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data. From 67702c214ef80d193c17ea3493df73572327e9a0 Mon Sep 17 00:00:00 2001 From: Enwei Date: Wed, 13 Apr 2022 18:10:13 +0800 Subject: [PATCH 13/13] Apply suggestions from code review --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index d289c10b40143..6ea1a8cd8a5f2 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -370,7 +370,7 @@ Configuration items related to storage. > **Warning:** > -> - Set `enable-ttl` value to `true` or `false` **ONLY WHEN** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item in an existing TiKV cluster. TiKV clusters with different `enable-ttl` values use different data formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, which causes the "can't enable TTL on a non-ttl" error when you restart the TiKV cluster. +> - Set `enable-ttl` to `true` or `false` **ONLY WHEN** deploying a new TiKV cluster. **DO NOT** modify the value of this configuration item in an existing TiKV cluster. TiKV clusters with different `enable-ttl` values use different data formats. Therefore, if you modify the value of this item in an existing TiKV cluster, the cluster will store data in different formats, which causes the "can't enable TTL on a non-ttl" error when you restart the TiKV cluster. > - Use `enable-ttl` **ONLY IN** a TiKV cluster. **DO NOT** use this configuration item in a cluster that has TiDB nodes (which means setting `enable-ttl` to `true` in such clusters). Otherwise, critical issues such as data corruption and the upgrade failure of TiDB clusters will occur. + TTL is short for "Time to live". If this item is enabled, TiKV automatically deletes data that reaches its TTL. To set the value of TTL, you need to specify it in the requests when writing data via the client. If the TTL is not specified, it means that TiKV does not automatically delete the corresponding data.