From 9f2cb0475d7df95f29720f92352cb0c242af7d0e Mon Sep 17 00:00:00 2001 From: yiduoyunQ <719547995@qq.com> Date: Tue, 3 Jun 2025 17:39:56 +0800 Subject: [PATCH 1/9] add-tikv-config --- en/configure-a-tidb-cluster.md | 6 +++++- zh/configure-a-tidb-cluster.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/en/configure-a-tidb-cluster.md b/en/configure-a-tidb-cluster.md index eaec9000a6..a791d52ec7 100644 --- a/en/configure-a-tidb-cluster.md +++ b/en/configure-a-tidb-cluster.md @@ -408,13 +408,17 @@ spec: [storage] [storage.block-cache] capacity = "16GB" + [log.file] + max-days = 30 + max-backups = 30 ``` For all the configurable parameters of TiKV, refer to [TiKV Configuration File](https://docs.pingcap.com/tidb/stable/tikv-configuration-file). > **Note:** > -> If you deploy your TiDB cluster using CR, make sure that `Config: {}` is set, no matter you want to modify `config` or not. Otherwise, TiKV components might not be started successfully. This step is meant to be compatible with `Helm` deployment. +> - If you deploy your TiDB cluster using CR, make sure that `Config: {}` is set, no matter you want to modify `config` or not. Otherwise, TiKV components might not be started successfully. This step is meant to be compatible with `Helm` deployment. +> - TiKV rocksdb log store in `/var/lib/tikv` data directory, recommend configure `max-days` and `max-backups` to automatically clean log files. #### Configure PD parameters diff --git a/zh/configure-a-tidb-cluster.md b/zh/configure-a-tidb-cluster.md index 1f907df264..9a78445ce0 100644 --- a/zh/configure-a-tidb-cluster.md +++ b/zh/configure-a-tidb-cluster.md @@ -402,13 +402,17 @@ spec: [storage] [storage.block-cache] capacity = "16GB" + [log.file] + max-days = 30 + max-backups = 30 ``` 获取所有可以配置的 TiKV 配置参数,请参考 [TiKV 配置文档](https://docs.pingcap.com/zh/tidb/stable/tikv-configuration-file) > **注意:** > -> 为了兼容 `helm` 部署,如果你是通过 CR 文件部署 TiDB 集群,即使你不设置 Config 配置,也需要保证 `Config: {}` 的设置,从而避免 TiKV 组件无法正常启动。 +> - 为了兼容 `helm` 部署,如果你是通过 CR 文件部署 TiDB 集群,即使你不设置 Config 配置,也需要保证 `Config: {}` 的设置,从而避免 TiKV 组件无法正常启动。 +> - TiKV 的 rocksdb 日志默认存储在 `/var/lib/tikv` 数据目录,建议配置 `max-days` 和 `max-backups` 来自动清理日志文件。 #### 配置 PD 配置参数 From 036fce0c8cc9a6cc037a5a3fabffbf4aa510b6ad Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Tue, 3 Jun 2025 22:59:17 +0800 Subject: [PATCH 2/9] Apply suggestions from code review --- en/configure-a-tidb-cluster.md | 2 +- zh/configure-a-tidb-cluster.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/en/configure-a-tidb-cluster.md b/en/configure-a-tidb-cluster.md index a791d52ec7..ddc59cdb18 100644 --- a/en/configure-a-tidb-cluster.md +++ b/en/configure-a-tidb-cluster.md @@ -418,7 +418,7 @@ For all the configurable parameters of TiKV, refer to [TiKV Configuration File]( > **Note:** > > - If you deploy your TiDB cluster using CR, make sure that `Config: {}` is set, no matter you want to modify `config` or not. Otherwise, TiKV components might not be started successfully. This step is meant to be compatible with `Helm` deployment. -> - TiKV rocksdb log store in `/var/lib/tikv` data directory, recommend configure `max-days` and `max-backups` to automatically clean log files. +> - TiKV RocksDB logs are stored in the `/var/lib/tikv` data directory. It is recommended that you configure `max-days` and `max-backups` to automatically clean log files. #### Configure PD parameters diff --git a/zh/configure-a-tidb-cluster.md b/zh/configure-a-tidb-cluster.md index 9a78445ce0..15c98a9a1a 100644 --- a/zh/configure-a-tidb-cluster.md +++ b/zh/configure-a-tidb-cluster.md @@ -412,7 +412,7 @@ spec: > **注意:** > > - 为了兼容 `helm` 部署,如果你是通过 CR 文件部署 TiDB 集群,即使你不设置 Config 配置,也需要保证 `Config: {}` 的设置,从而避免 TiKV 组件无法正常启动。 -> - TiKV 的 rocksdb 日志默认存储在 `/var/lib/tikv` 数据目录,建议配置 `max-days` 和 `max-backups` 来自动清理日志文件。 +> - TiKV 的 RocksDB 日志默认存储在 `/var/lib/tikv` 数据目录,建议配置 `max-days` 和 `max-backups` 来自动清理日志文件。 #### 配置 PD 配置参数 From 49480bd450ccaaaa20acd0a25b6391fe949110ce Mon Sep 17 00:00:00 2001 From: yiduoyunQ <719547995@qq.com> Date: Wed, 4 Jun 2025 11:20:05 +0800 Subject: [PATCH 3/9] add-tikv-config --- en/configure-a-tidb-cluster.md | 1 + zh/configure-a-tidb-cluster.md | 1 + 2 files changed, 2 insertions(+) diff --git a/en/configure-a-tidb-cluster.md b/en/configure-a-tidb-cluster.md index ddc59cdb18..7c3d186c62 100644 --- a/en/configure-a-tidb-cluster.md +++ b/en/configure-a-tidb-cluster.md @@ -419,6 +419,7 @@ For all the configurable parameters of TiKV, refer to [TiKV Configuration File]( > > - If you deploy your TiDB cluster using CR, make sure that `Config: {}` is set, no matter you want to modify `config` or not. Otherwise, TiKV components might not be started successfully. This step is meant to be compatible with `Helm` deployment. > - TiKV RocksDB logs are stored in the `/var/lib/tikv` data directory. It is recommended that you configure `max-days` and `max-backups` to automatically clean log files. +> - We also have a `separateRocksDBLog` item to configure TiKV to output RocksDB log to stdout, refer to the [TidbCluster example](https://github.com/pingcap/tidb-operator/blob/master/examples/advanced/tidb-cluster.yaml) for an example. #### Configure PD parameters diff --git a/zh/configure-a-tidb-cluster.md b/zh/configure-a-tidb-cluster.md index 15c98a9a1a..142646ae2d 100644 --- a/zh/configure-a-tidb-cluster.md +++ b/zh/configure-a-tidb-cluster.md @@ -413,6 +413,7 @@ spec: > > - 为了兼容 `helm` 部署,如果你是通过 CR 文件部署 TiDB 集群,即使你不设置 Config 配置,也需要保证 `Config: {}` 的设置,从而避免 TiKV 组件无法正常启动。 > - TiKV 的 RocksDB 日志默认存储在 `/var/lib/tikv` 数据目录,建议配置 `max-days` 和 `max-backups` 来自动清理日志文件。 +> - 你也可通过配置 `separateRocksDBLog` 将 rocksdb 日志通过单独的 sidecar 容器输出到 stdout,完整配置项请参考 TidbCluster [示例](https://github.com/pingcap/tidb-operator/blob/master/examples/advanced/tidb-cluster.yaml)。 #### 配置 PD 配置参数 From f78ba4cbfee5de5fe17cf8731f6b135949b23eb4 Mon Sep 17 00:00:00 2001 From: yiduoyunQ <719547995@qq.com> Date: Wed, 4 Jun 2025 11:20:33 +0800 Subject: [PATCH 4/9] add-tikv-config --- en/configure-a-tidb-cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/configure-a-tidb-cluster.md b/en/configure-a-tidb-cluster.md index 7c3d186c62..ad45d0e916 100644 --- a/en/configure-a-tidb-cluster.md +++ b/en/configure-a-tidb-cluster.md @@ -418,7 +418,7 @@ For all the configurable parameters of TiKV, refer to [TiKV Configuration File]( > **Note:** > > - If you deploy your TiDB cluster using CR, make sure that `Config: {}` is set, no matter you want to modify `config` or not. Otherwise, TiKV components might not be started successfully. This step is meant to be compatible with `Helm` deployment. -> - TiKV RocksDB logs are stored in the `/var/lib/tikv` data directory. It is recommended that you configure `max-days` and `max-backups` to automatically clean log files. +> - TiKV RocksDB logs are stored in the `/var/lib/tikv` data directory by default. It is recommended that you configure `max-days` and `max-backups` to automatically clean log files. > - We also have a `separateRocksDBLog` item to configure TiKV to output RocksDB log to stdout, refer to the [TidbCluster example](https://github.com/pingcap/tidb-operator/blob/master/examples/advanced/tidb-cluster.yaml) for an example. #### Configure PD parameters From 75c8933390744b942da8b0294bf22a4d6c7ec355 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Wed, 4 Jun 2025 15:27:37 +0800 Subject: [PATCH 5/9] Update en/configure-a-tidb-cluster.md --- en/configure-a-tidb-cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/configure-a-tidb-cluster.md b/en/configure-a-tidb-cluster.md index ad45d0e916..29f888c0f0 100644 --- a/en/configure-a-tidb-cluster.md +++ b/en/configure-a-tidb-cluster.md @@ -419,7 +419,7 @@ For all the configurable parameters of TiKV, refer to [TiKV Configuration File]( > > - If you deploy your TiDB cluster using CR, make sure that `Config: {}` is set, no matter you want to modify `config` or not. Otherwise, TiKV components might not be started successfully. This step is meant to be compatible with `Helm` deployment. > - TiKV RocksDB logs are stored in the `/var/lib/tikv` data directory by default. It is recommended that you configure `max-days` and `max-backups` to automatically clean log files. -> - We also have a `separateRocksDBLog` item to configure TiKV to output RocksDB log to stdout, refer to the [TidbCluster example](https://github.com/pingcap/tidb-operator/blob/master/examples/advanced/tidb-cluster.yaml) for an example. +> - You can also use the `separateRocksDBLog` configuration item to configure TiKV to output RocksDB log to stdout. For more information, see the [TidbCluster example](https://github.com/pingcap/tidb-operator/blob/master/examples/advanced/tidb-cluster.yaml). #### Configure PD parameters From 107827f375935b1a42bbbe22228bd350579d563b Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Wed, 4 Jun 2025 15:30:48 +0800 Subject: [PATCH 6/9] Update en/configure-a-tidb-cluster.md --- en/configure-a-tidb-cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/configure-a-tidb-cluster.md b/en/configure-a-tidb-cluster.md index 29f888c0f0..bd7bc4e46f 100644 --- a/en/configure-a-tidb-cluster.md +++ b/en/configure-a-tidb-cluster.md @@ -419,7 +419,7 @@ For all the configurable parameters of TiKV, refer to [TiKV Configuration File]( > > - If you deploy your TiDB cluster using CR, make sure that `Config: {}` is set, no matter you want to modify `config` or not. Otherwise, TiKV components might not be started successfully. This step is meant to be compatible with `Helm` deployment. > - TiKV RocksDB logs are stored in the `/var/lib/tikv` data directory by default. It is recommended that you configure `max-days` and `max-backups` to automatically clean log files. -> - You can also use the `separateRocksDBLog` configuration item to configure TiKV to output RocksDB log to stdout. For more information, see the [TidbCluster example](https://github.com/pingcap/tidb-operator/blob/master/examples/advanced/tidb-cluster.yaml). +> - You can also use the `separateRocksDBLog` configuration item to configure TiKV to output RocksDB logs to stdout through a sidecar container. For more information, see the [TiDB Cluster example](https://github.com/pingcap/tidb-operator/blob/master/examples/advanced/tidb-cluster.yaml). #### Configure PD parameters From 8b4768f4e314454e0d21ba282a891239e4f3cd2d Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Wed, 4 Jun 2025 15:30:55 +0800 Subject: [PATCH 7/9] Update zh/configure-a-tidb-cluster.md --- zh/configure-a-tidb-cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh/configure-a-tidb-cluster.md b/zh/configure-a-tidb-cluster.md index 142646ae2d..2aebaaccac 100644 --- a/zh/configure-a-tidb-cluster.md +++ b/zh/configure-a-tidb-cluster.md @@ -413,7 +413,7 @@ spec: > > - 为了兼容 `helm` 部署,如果你是通过 CR 文件部署 TiDB 集群,即使你不设置 Config 配置,也需要保证 `Config: {}` 的设置,从而避免 TiKV 组件无法正常启动。 > - TiKV 的 RocksDB 日志默认存储在 `/var/lib/tikv` 数据目录,建议配置 `max-days` 和 `max-backups` 来自动清理日志文件。 -> - 你也可通过配置 `separateRocksDBLog` 将 rocksdb 日志通过单独的 sidecar 容器输出到 stdout,完整配置项请参考 TidbCluster [示例](https://github.com/pingcap/tidb-operator/blob/master/examples/advanced/tidb-cluster.yaml)。 +> - 你也可通过配置 `separateRocksDBLog` 将 RocksDB 日志通过单独的 sidecar 容器输出到 stdout。完整配置项请参考 [TiDB Cluster 示例](https://github.com/pingcap/tidb-operator/blob/master/examples/advanced/tidb-cluster.yaml)。 #### 配置 PD 配置参数 From aa83b72baa9a8624ab44b4136d5a82d1f3c55ede Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Wed, 4 Jun 2025 17:14:50 +0800 Subject: [PATCH 8/9] Update configure-a-tidb-cluster.md --- en/configure-a-tidb-cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/configure-a-tidb-cluster.md b/en/configure-a-tidb-cluster.md index bd7bc4e46f..c7da38f1ae 100644 --- a/en/configure-a-tidb-cluster.md +++ b/en/configure-a-tidb-cluster.md @@ -492,7 +492,7 @@ spec: level = "info" ``` -For all the configurable parameters of TiProxy, refer to [TiProxy Configuration File](https://docs.pingcap.com/tidb/v7.6/tiproxy-configuration). +For all the configurable parameters of TiProxy, refer to [TiProxy Configuration File](https://docs.pingcap.com/tidb/stable/tiproxy-configuration). #### Configure TiFlash parameters From 743af6eaa2159293381b4ab2a57a1eb1ea5a35f8 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Wed, 4 Jun 2025 17:15:18 +0800 Subject: [PATCH 9/9] Update configure-a-tidb-cluster.md --- zh/configure-a-tidb-cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh/configure-a-tidb-cluster.md b/zh/configure-a-tidb-cluster.md index 2aebaaccac..7b5f64a704 100644 --- a/zh/configure-a-tidb-cluster.md +++ b/zh/configure-a-tidb-cluster.md @@ -482,7 +482,7 @@ spec: level = "info" ``` -获取所有可以配置的 TiProxy 配置参数,请参考 [TiProxy 配置文档](https://docs.pingcap.com/zh/tidb/v7.6/tiproxy-configuration)。 +获取所有可以配置的 TiProxy 配置参数,请参考 [TiProxy 配置文档](https://docs.pingcap.com/zh/tidb/stable/tiproxy-configuration)。 #### 配置 TiFlash 配置参数