From 27b03e6a6c500c08770921edbd1b99235cfe0939 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 24 Jun 2025 09:49:03 +0800 Subject: [PATCH 1/3] This is an automated cherry-pick of #21217 Signed-off-by: ti-chi-bot --- storage-engine/titan-configuration.md | 11 +++++++++++ tikv-configuration-file.md | 15 +++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/storage-engine/titan-configuration.md b/storage-engine/titan-configuration.md index 4dc43445eceae..e276aadff97af 100644 --- a/storage-engine/titan-configuration.md +++ b/storage-engine/titan-configuration.md @@ -118,7 +118,15 @@ To disable Titan, you can configure the `rocksdb.defaultcf.titan.blob-run-mode` - When the option is set to `read-only`, all newly written values are written into RocksDB, regardless of the value size. - When the option is set to `fallback`, all newly written values are written into RocksDB, regardless of the value size. Also, all compacted values stored in the Titan blob file are automatically moved back to RocksDB. +<<<<<<< HEAD To disable Titan, perform the following steps: +======= +To disable Titan for all existing and future data, you can take the following steps. Note that you can skip Step 2 because it greatly affects online traffic performance. In fact even without Step 2, the data compaction consumes extra I/O and CPU resources when it moves data from Titan to RocksDB, and performance will degrade (sometimes as much as 50%) when TiKV I/O or CPU resources are limited. + +> **Warning:** +> +> When disabling Titan for TiDB versions earlier than v8.5.0, it is not recommended to modify the TiKV configuration item [`rocksdb.titan.enabled`](/tikv-configuration-file.md#enabled) to `false`, as this might cause TiKV to crash. Following Step 1 is sufficient to disable Titan. +>>>>>>> 445dea0c18 (titan-configuration: remove the unrecommended steps of updating TiKV configuration (#21217)) 1. Update the configuration file of the TiKV nodes you wish to disable Titan for and restart TiKV: @@ -137,6 +145,7 @@ To disable Titan, perform the following steps: 3. After the compaction is finished, wait until the **Blob file count** metrics under **TiKV-Details/Titan - kv** decrease to `0`. +<<<<<<< HEAD 4. Update the configuration of these TiKV nodes to disable Titan. ```toml @@ -148,6 +157,8 @@ To disable Titan, perform the following steps: > > Disabling Titan is an experimental feature. It is **NOT** recommended to use it if not necessary. +======= +>>>>>>> 445dea0c18 (titan-configuration: remove the unrecommended steps of updating TiKV configuration (#21217)) ## Level Merge (experimental) In TiKV 4.0, [Level Merge](/storage-engine/titan-overview.md#level-merge), a new algorithm, is introduced to improve the performance of range query and to reduce the impact of Titan GC on the foreground write operations. You can enable Level Merge using the following option: diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 4d0caaa176cfa..319eb04677c8c 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1052,8 +1052,23 @@ Configuration items related to Titan. ### `enabled` +<<<<<<< HEAD + Enables or disables Titan + Default value: `false` +======= +> **Warning** +> +> When disabling Titan for TiDB versions earlier than v8.5.0, it is not recommended to modify this configuration item to `false`, as this might cause TiKV to crash. To disable Titan, refer to the steps in [Disable Titan](/storage-engine/titan-configuration.md#disable-titan). + +> **Note:** +> +> - To enhance the performance of wide table and JSON data writing and point query, starting from TiDB v7.6.0, the default value changes from `false` to `true`, which means that Titan is enabled by default. +> - Existing clusters upgraded to v7.6.0 or later versions retain the original configuration, which means that if Titan is not explicitly enabled, it still uses RocksDB. +> - If the cluster has enabled Titan before upgrading to TiDB v7.6.0 or later versions, Titan will be retained after the upgrade, and the [`min-blob-size`](/tikv-configuration-file.md#min-blob-size) configuration before the upgrade will be retained. If you do not explicitly configure the value before the upgrade, the default value of the previous version `1KiB` will be retained to ensure the stability of the cluster configuration after the upgrade. + ++ Enables or disables Titan. ++ Default value: `true` +>>>>>>> 445dea0c18 (titan-configuration: remove the unrecommended steps of updating TiKV configuration (#21217)) ### `dirname` From 49b788d93961e4a9d2ec41b9517481413f080132 Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 24 Jun 2025 10:37:11 +0800 Subject: [PATCH 2/3] resolve conflicts --- storage-engine/titan-configuration.md | 22 ++++------------------ tikv-configuration-file.md | 15 ++------------- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/storage-engine/titan-configuration.md b/storage-engine/titan-configuration.md index e276aadff97af..ace20b806ce17 100644 --- a/storage-engine/titan-configuration.md +++ b/storage-engine/titan-configuration.md @@ -112,21 +112,21 @@ To adjust Titan-related parameters using TiUP, refer to [Modify the configuratio ## Disable Titan (experimental) +> **Warning:** +> +> Disabling Titan is an experimental feature. It is **NOT** recommended to use it if not necessary. + To disable Titan, you can configure the `rocksdb.defaultcf.titan.blob-run-mode` option. The optional values for `blob-run-mode` are as follows: - When the option is set to `normal`, Titan performs read and write operations normally. - When the option is set to `read-only`, all newly written values are written into RocksDB, regardless of the value size. - When the option is set to `fallback`, all newly written values are written into RocksDB, regardless of the value size. Also, all compacted values stored in the Titan blob file are automatically moved back to RocksDB. -<<<<<<< HEAD -To disable Titan, perform the following steps: -======= To disable Titan for all existing and future data, you can take the following steps. Note that you can skip Step 2 because it greatly affects online traffic performance. In fact even without Step 2, the data compaction consumes extra I/O and CPU resources when it moves data from Titan to RocksDB, and performance will degrade (sometimes as much as 50%) when TiKV I/O or CPU resources are limited. > **Warning:** > > When disabling Titan for TiDB versions earlier than v8.5.0, it is not recommended to modify the TiKV configuration item [`rocksdb.titan.enabled`](/tikv-configuration-file.md#enabled) to `false`, as this might cause TiKV to crash. Following Step 1 is sufficient to disable Titan. ->>>>>>> 445dea0c18 (titan-configuration: remove the unrecommended steps of updating TiKV configuration (#21217)) 1. Update the configuration file of the TiKV nodes you wish to disable Titan for and restart TiKV: @@ -145,20 +145,6 @@ To disable Titan for all existing and future data, you can take the following st 3. After the compaction is finished, wait until the **Blob file count** metrics under **TiKV-Details/Titan - kv** decrease to `0`. -<<<<<<< HEAD -4. Update the configuration of these TiKV nodes to disable Titan. - - ```toml - [rocksdb.titan] - enabled = false - ``` - -> **Warning:** -> -> Disabling Titan is an experimental feature. It is **NOT** recommended to use it if not necessary. - -======= ->>>>>>> 445dea0c18 (titan-configuration: remove the unrecommended steps of updating TiKV configuration (#21217)) ## Level Merge (experimental) In TiKV 4.0, [Level Merge](/storage-engine/titan-overview.md#level-merge), a new algorithm, is introduced to improve the performance of range query and to reduce the impact of Titan GC on the foreground write operations. You can enable Level Merge using the following option: diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 319eb04677c8c..a55d91584c0b6 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1052,23 +1052,12 @@ Configuration items related to Titan. ### `enabled` -<<<<<<< HEAD -+ Enables or disables Titan -+ Default value: `false` -======= > **Warning** > > When disabling Titan for TiDB versions earlier than v8.5.0, it is not recommended to modify this configuration item to `false`, as this might cause TiKV to crash. To disable Titan, refer to the steps in [Disable Titan](/storage-engine/titan-configuration.md#disable-titan). -> **Note:** -> -> - To enhance the performance of wide table and JSON data writing and point query, starting from TiDB v7.6.0, the default value changes from `false` to `true`, which means that Titan is enabled by default. -> - Existing clusters upgraded to v7.6.0 or later versions retain the original configuration, which means that if Titan is not explicitly enabled, it still uses RocksDB. -> - If the cluster has enabled Titan before upgrading to TiDB v7.6.0 or later versions, Titan will be retained after the upgrade, and the [`min-blob-size`](/tikv-configuration-file.md#min-blob-size) configuration before the upgrade will be retained. If you do not explicitly configure the value before the upgrade, the default value of the previous version `1KiB` will be retained to ensure the stability of the cluster configuration after the upgrade. - -+ Enables or disables Titan. -+ Default value: `true` ->>>>>>> 445dea0c18 (titan-configuration: remove the unrecommended steps of updating TiKV configuration (#21217)) ++ Enables or disables Titan ++ Default value: `false` ### `dirname` From 19044528d348a4e0cc97b906d4e51db127dc2293 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 25 Jun 2025 14:18:14 +0800 Subject: [PATCH 3/3] Update tikv-configuration-file.md --- 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 a55d91584c0b6..201ba14c630bc 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1054,7 +1054,7 @@ Configuration items related to Titan. > **Warning** > -> When disabling Titan for TiDB versions earlier than v8.5.0, it is not recommended to modify this configuration item to `false`, as this might cause TiKV to crash. To disable Titan, refer to the steps in [Disable Titan](/storage-engine/titan-configuration.md#disable-titan). +> When disabling Titan for TiDB versions earlier than v8.5.0, it is not recommended to modify this configuration item to `false`, as this might cause TiKV to crash. To disable Titan, refer to the steps in [Disable Titan (experimental)](/storage-engine/titan-configuration.md#disable-titan-experimental). + Enables or disables Titan + Default value: `false`