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

tikv: deprecate rocksdb's log configs #17321

Merged
merged 7 commits into from
Jun 5, 2024

Conversation

glorv
Copy link
Contributor

@glorv glorv commented May 13, 2024

First-time contributors' checklist

What is changed, added or deleted? (Required)

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v8.1 (TiDB 8.1 versions)
  • v8.0 (TiDB 8.0 versions)
  • v7.6 (TiDB 7.6 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@glorv glorv requested review from Connor1996 and qiancai May 13, 2024 11:06
@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 13, 2024
Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

ti-chi-bot bot commented May 15, 2024

@Connor1996: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

+ Info 日志的最大大小。
+ 默认值:1GiB
+ 最小值:0
+ 单位:B|KiB|MiB|GiB

### `info-log-roll-time`

> **警告:**
>
> 自 v5.4.0 起,该配置项被废弃,TiKV 不再支持按照时间自动切分日志,请使用配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 配置日志自动切分的阈值。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.4.0 起,该配置项被废弃,TiKV 不再支持按照时间自动切分日志,请使用配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 配置日志自动切分的阈值。
> 自 v5.4.0 起,RocksDB 的日志改为由 TiKV 的 log 模块进行管理,因此该配置项被废弃,TiKV 不再支持按照时间自动切分日志,请使用配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 配置日志自动切分的阈值。

+ 日志截断间隔时间,如果为 0s 则不截断。
+ 默认值:0s

### `info-log-keep-log-file-num`

> **警告:**
>
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.file.max-backups`](#max-backups-从-v540-版本开始引入) 代替。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.file.max-backups`](#max-backups-从-v540-版本开始引入) 代替。
> 自 v5.4.0 起,RocksDB 的日志改为由 TiKV 的 log 模块进行管理,因此该配置项被废弃,其功能由配置参数 [`log.file.max-backups`](#max-backups-从-v540-版本开始引入) 代替。

@@ -1293,6 +1307,10 @@ RocksDB 相关的配置项。

### `info-log-level`

> **警告:**
>
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.level`](#level-从-v540-版本开始引入) 代替。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.level`](#level-从-v540-版本开始引入) 代替。
> 自 v5.4.0 起,RocksDB 的日志改为由 TiKV 的 log 模块进行管理,因此该配置项被废弃,其功能由配置参数 [`log.level`](#level-从-v540-版本开始引入) 代替。

@@ -1846,18 +1864,30 @@ raftdb 相关配置项。

### `info-log-max-size`

> **警告:**
>
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 代替。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 代替。
> 自 v5.4.0 起,RocksDB 的日志改为由 TiKV 的 log 模块进行管理,因此该配置项被废弃,其功能由配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 代替。

+ Info 日志的最大大小。
+ 默认值:`"1GiB"`
+ 最小值:`0`
+ 单位:B|KiB|MiB|GiB

### `info-log-roll-time`

> **警告:**
>
> 自 v5.4.0 起,该配置项被废弃,TiKV 不再支持按照时间自动切分日志,请使用配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 配置日志自动切分的阈值。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.4.0 起,该配置项被废弃,TiKV 不再支持按照时间自动切分日志,请使用配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 配置日志自动切分的阈值。
> 自 v5.4.0 起,RocksDB 的日志改为由 TiKV 的 log 模块进行管理,因此该配置项被废弃,TiKV 不再支持按照时间自动切分日志,请使用配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 配置日志自动切分的阈值。

+ Info 日志截断间隔时间,如果为 `"0s"` 则不截断。
+ 默认值:`"0s"`

### `info-log-keep-log-file-num`

> **警告:**
>
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.file.max-backups`](#max-backups-从-v540-版本开始引入) 代替。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.file.max-backups`](#max-backups-从-v540-版本开始引入) 代替。
> 自 v5.4.0 起,RocksDB 的日志改为由 TiKV 的 log 模块进行管理,因此该配置项被废弃,其功能由配置参数 [`log.file.max-backups`](#max-backups-从-v540-版本开始引入) 代替。

@@ -1869,6 +1899,10 @@ raftdb 相关配置项。

### `info-log-level`

> **警告:**
>
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.level`](#level-从-v540-版本开始引入) 代替。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.level`](#level-从-v540-版本开始引入) 代替。
> 自 v5.4.0 起,RocksDB 的日志改为由 TiKV 的 log 模块进行管理,因此该配置项被废弃,其功能由配置参数 [`log.level`](#level-从-v540-版本开始引入) 代替。

@@ -59,6 +59,8 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con

自 v5.4.0 版本起,废弃原 log 参数 `log-rotation-timespan`,并将 `log-level`、`log-format`、`log-file`、`log-rotation-size` 变更为下列参数,与 TiDB 的 log 参数保持一致。如果只设置了原参数、且把其值设为非默认值,原参数与新参数会保持兼容;如果同时设置了原参数和新参数,则会使用新参数。

自 v5.4.0 版本起,Rocksdb 的 log 也改为由 TiKV 的 log 模块进行管理,Rocksdb 的相关配置项 `info-log-level`、`info-log-max-size`、`info-log-roll-time`、`info-log-keep-log-file-num` 等参数已被废弃不再起作用,相关配置与 TiKV 日志相关配置项合并。注意 Rocksdb 的 `info-log-dir` 依然有效,用于设置 Rocksdb 日志存储的路径。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里看起来可以删除这句话并把它挪到 v5.4.0 release notes 兼容性变更中 https://docs.pingcap.com/zh/tidb/stable/release-5.4.0#%E5%85%B6%E4%BB%96,这样 L60 那句 “废弃原 log 参数 log-rotation-timespan,并将 xxx 变更为下列参数” 和下面的参数看起来更连贯。

@qiancai
Copy link
Collaborator

qiancai commented May 20, 2024

@glorv I've added some comments. PTAL.

@qiancai qiancai self-assigned this May 20, 2024
@qiancai qiancai added the translation/doing This PR’s assignee is translating this PR. label May 20, 2024
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label May 20, 2024
@qiancai qiancai added the area/engine Indicates that the Issue or PR belongs to the area of TP storage or Cloud storage. label May 20, 2024
@@ -1270,18 +1272,30 @@ RocksDB 相关的配置项。

### `info-log-max-size`

> **警告:**
>
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 代替。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.4.0 起,该配置项被废弃,其功能由配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 代替。
> 自 v5.4.0 起,RocksDB 的日志改为由 TiKV 的 log 模块进行管理,因此该配置项被废弃,其功能由配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 代替。

@glorv
Copy link
Contributor Author

glorv commented May 21, 2024

@glorv I've added some comments. PTAL.

@qiancai Done

+ Info 日志的最大大小。
+ 默认值:1GiB
+ 最小值:0
+ 单位:B|KiB|MiB|GiB

### `info-log-roll-time`

> **警告:**
>
> 自 v5.0.0 起,RocksDB 的日志改为由 TiKV 的日志模块进行管理,因此该配置项被废弃,,TiKV 不再支持按照时间自动切分日志,请使用配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 配置日志自动切分的阈值。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.0.0 起,RocksDB 的日志改为由 TiKV 的日志模块进行管理,因此该配置项被废弃,TiKV 不再支持按照时间自动切分日志,请使用配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 配置日志自动切分的阈值。
> 自 v5.0.0 起,RocksDB 的日志改为由 TiKV 的日志模块进行管理,因此该配置项被废弃,TiKV 不再支持按照时间自动切分日志,请使用配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 配置日志自动切分的阈值。

@@ -1270,18 +1270,30 @@ RocksDB 相关的配置项。

### `info-log-max-size`

> **警告:**
>
> 自 v5.0.0 起,RocksDB 的日志改为由 TiKV 的日志模块进行管理,因此该配置项被废弃,其功能由配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 代替。
Copy link
Collaborator

@qiancai qiancai May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“自 v5.0.0 起” 要改成 “自 v5.4.0 起” 吗? log.file.max-size 是 v5.4 引入的

下面的修改也有这个问题

@@ -1270,18 +1270,30 @@ RocksDB 相关的配置项。

### `info-log-max-size`

> **警告:**
>
> 自 v5.0.0 起,RocksDB 的日志改为由 TiKV 的日志模块进行管理,因此该配置项被废弃,其功能由配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 代替。
Copy link
Collaborator

@qiancai qiancai May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 自 v5.0.0 起,RocksDB 的日志改为由 TiKV 的日志模块进行管理,因此该配置项被废弃,其功能由配置参数 [`log.file.max-size`](#max-size-从-v540-版本开始引入) 代替
> 自 v5.0.0 起,RocksDB 的日志改为由 TiKV 的日志模块进行管理,因此该配置项被废弃。
>
> - 在 v5.1.0、v5.2.0、v5.3.0 及其补丁版本中,其功能由配置参数 `xxx` 代替。
> - 从 v5.4.0 起,`xxx` 更名为 `log.file.max-size`,因此请用 `log.file.max-size` 进行设置。

tikv-configuration-file.md Outdated Show resolved Hide resolved
tikv-configuration-file.md Outdated Show resolved Hide resolved
glorv and others added 2 commits May 23, 2024 14:26
Co-authored-by: Grace Cai <qqzczy@126.com>
Co-authored-by: Grace Cai <qqzczy@126.com>
Copy link

ti-chi-bot bot commented May 23, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-05-23 06:27:31.56630951 +0000 UTC m=+2325805.323445083: ☑️ agreed by qiancai.

@qiancai qiancai added the needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. label May 23, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #17565.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-5.4: #17566.

ti-chi-bot pushed a commit to ti-chi-bot/docs-cn that referenced this pull request Jun 5, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.1: #17567.

ti-chi-bot pushed a commit to ti-chi-bot/docs-cn that referenced this pull request Jun 5, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #17568.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #17569.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #17570.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.6: #17571.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.0: #17572.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/engine Indicates that the Issue or PR belongs to the area of TP storage or Cloud storage. lgtm needs-1-more-lgtm needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-7.6 Should cherry pick this PR to release-7.6 branch. needs-cherry-pick-release-8.0 Should cherry pick this PR to release-8.0 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants