Skip to content

Commit 1b32f40

Browse files
authored
titan-configuration: remove the unrecommended steps of updating TiKV configuration (#20526) (#20545)
1 parent 0f7030f commit 1b32f40

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

storage-engine/titan-configuration.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ Titan 对 RocksDB 兼容,也就是说,使用 RocksDB 存储引擎的现有 T
118118
- 当设置为 `read-only` 时,新写入的 value 不论大小均会写入 RocksDB。
119119
- 当设置为 `fallback` 时,新写入的 value 不论大小均会写入 RocksDB,并且当 RocksDB 进行 compaction 时,会自动把所碰到的存储在 Titan blob file 中的 value 移回 RocksDB。
120120

121-
如果现有数据和未来数据均不再需要 Titan,可执行以下步骤完全关闭 Titan:
121+
如果现有数据和未来数据均不再需要 Titan,可执行以下步骤关闭 Titan。一般情况下,只需要执行以下步骤 1 和步骤 3 即可。步骤 2 虽然可以加快数据迁移速度,但会严重影响用户 SQL 的性能。事实上,即使跳过步骤 2,由于在 Compaction 过程中会将数据从 Titan 迁移到 RocksDB,会占用额外的 I/O 和 CPU 资源,因此仍然可以观察到一定的性能损失,在资源紧张的情况下吞吐可以下降 50% 以上。
122+
123+
> **警告:**
124+
>
125+
> 对于 v8.5.0 之前的版本,关闭 Titan 时,不建议修改 TiKV 配置项 [`rocksdb.titan.enabled`](/tikv-configuration-file.md#enabled) 为 `false`,因为该修改可能导致 TiKV crash。执行以下步骤 1 即可达到关闭 Titan 的目的。
122126

123127
1. 更新需要关闭 Titan 的 TiKV 节点的配置。你可以通过以下两种方式之一更新 TiKV 配置:
124128

@@ -139,13 +143,6 @@ Titan 对 RocksDB 兼容,也就是说,使用 RocksDB 存储引擎的现有 T
139143

140144
3. 数据整理结束后,通过 **TiKV-Details**/**Titan - kv** 监控面板确认 **Blob file count** 指标降为 0。
141145

142-
4. 更新 TiKV 节点的配置,关闭 Titan。
143-
144-
```toml
145-
[rocksdb.titan]
146-
enabled = false
147-
```
148-
149146
## Level Merge(实验功能)
150147

151148
TiKV 4.0 中 Titan 提供新的算法提升范围查询性能并降低 Titan GC 对前台写入性能的影响。这个新的算法称为 [Level Merge](/storage-engine/titan-overview.md#level-merge)。Level Merge 可以通过以下选项开启:

tikv-configuration-file.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,6 +1357,10 @@ Titan 相关的配置项。
13571357

13581358
### `enabled`
13591359

1360+
> **警告:**
1361+
>
1362+
> 对于 v8.5.0 之前的版本,关闭 Titan 时,不建议修改该配置项值为 `false`,因为该修改可能导致 TiKV crash。要关闭 Titan,请参考[关闭 Titan](/storage-engine/titan-configuration.md#关闭-titan) 中的步骤。
1363+
13601364
+ 开启 Titan 开关。
13611365
+ 默认值:false
13621366

0 commit comments

Comments
 (0)