Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raft-engine: add the spill-dir config parameter #18690

Merged
merged 6 commits into from
Oct 15, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,20 @@ Raft Engine 相关的配置项。
+ 如果你的机器上有多个磁盘,建议将 Raft Engine 的数据存储在单独的磁盘上,以提高 TiKV 性能。
+ 默认值:`""`

### `spill-dir` <span class="version-mark">从 v8.4.0 版本开始引入</span>

+ 存储 Raft 日志文件的辅助目录,当 `dir` 目录所在盘数据写满后,新的 Raft 日志将存储在该目录下。如果该目录配置后不存在,则在启动 TiKV 时创建该目录。
lilin90 marked this conversation as resolved.
Show resolved Hide resolved
+ 如果未设置此配置,则表示该目录不存在。
LykxSassinator marked this conversation as resolved.
Show resolved Hide resolved

> **注意:**
>
> - 该配置仅在 Raft Engine 的 `dir` 和 `spill-dir` 各自指定为**不同盘符**的情况下有效。
LykxSassinator marked this conversation as resolved.
Show resolved Hide resolved
> - 在配置该功能后,若想要关闭该功能,你需要在重启 TiKV **之前**执行如下操作:
LykxSassinator marked this conversation as resolved.
Show resolved Hide resolved
> 1. 关闭 TiKV;
> 2. 将该目录下的所有 Raft Log 拷贝至 [`dir`](/tikv-configuration-file.md#dir) 目录下;
> 3. 从 TiKV 配置文件中删除该配置;
> 4. 重启 TiKV;
LykxSassinator marked this conversation as resolved.
Show resolved Hide resolved

### `batch-compression-threshold`

+ 指定日志批处理的阈值大小。大于此配置的日志批次将被压缩。如果将此配置项设置为 `0`,则禁用压缩。
Expand Down