Skip to content

Conversation

qiancai
Copy link
Owner

@qiancai qiancai commented Mar 8, 2025

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)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.1 (TiDB 8.1 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)

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

Copy link

coderabbitai bot commented Mar 8, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.


### end-point-memory-quota <span class="version-mark">从 v8.2.0 版本开始引入</span>

* TiKV Coproccessor 请求可以使用的内存上限,超过该值后后续的 Coprocessor 请求将被拒绝并报错(server is busy)。
Copy link

Choose a reason for hiding this comment

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

该描述不够清晰,建议明确说明 Coprocessor 请求被拒绝的具体错误信息,并补充对内存配额计算方式的解释。

Suggested change
* TiKV Coproccessor 请求可以使用的内存上限,超过该值后后续的 Coprocessor 请求将被拒绝并报错(server is busy
* TiKV Coprocessor 请求可以使用的内存上限,超过该值后后续的 Coprocessor 请求将被拒绝并返回 "server is busy" 错误。内存配额的计算方式为系统总内存大小的 45%,但最大不超过 500MB

## txn-status-cache-capacity <span class="version-mark">从 v7.6.0 版本开始引入</span>

+ 设置 TiKV 内的事务状态 cache 的容量。不建议用户随意修改。
Copy link

Choose a reason for hiding this comment

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

该句描述过于简单,建议补充事务状态 cache 的具体作用和影响,以便用户理解其重要性。

Suggested change
+ 设置 TiKV 内的事务状态 cache 的容量。不建议用户随意修改。
设置 TiKV 内的事务状态 cache 的容量。该 cache 用于存储事务的状态信息,容量过小可能导致事务状态查询性能下降,过大则可能占用过多内存。不建议用户随意修改。


### follower-read-max-log-gap <span class="version-mark">从 v7.4.0 版本开始引入</span>

+ follower 处理读请求时允许的最大日志落后数目,超出则拒绝读请求。
Copy link

Choose a reason for hiding this comment

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

描述不够清晰,建议明确说明日志落后数目的具体含义及其对读请求的影响。

Suggested change
+ follower 处理读请求时允许的最大日志落后数目,超出则拒绝读请求。
+ follower 处理读请求时允许的最大日志落后数目(即 follower 与 leader 之间的日志差距),超出则拒绝读请求。


### inspect-cpu-util-thd <span class="version-mark">从 v7.6.0 版本开始引入</span>

+ TiKV 进行慢节点检测时判定节点 CPU 是否处于繁忙状态的阈值。范围 [0%, 100%]
Copy link

Choose a reason for hiding this comment

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

建议补充说明 CPU 繁忙状态对慢节点检测的具体影响。

Suggested change
+ TiKV 进行慢节点检测时判定节点 CPU 是否处于繁忙状态的阈值。范围 [0%, 100%]
+ TiKV 进行慢节点检测时判定节点 CPU 是否处于繁忙状态的阈值。范围 [0%, 100%]当 CPU 使用率超过该阈值时,节点将被判定为繁忙状态,可能影响慢节点检测的准确性。


### inspect-kvdb-interval <span class="version-mark">从 v8.1.2 版本开始引入</span>

+ TiKV 进行慢节点检测时检查 KV 盘的间隔和超时时间。如果 KVDB 和 RaftDB 使用相同的挂载路径,该值将被覆盖为 0(不检测)。
Copy link

Choose a reason for hiding this comment

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

描述不够清晰,建议明确说明 KVDB 和 RaftDB 使用相同挂载路径时的具体行为。

Suggested change
+ TiKV 进行慢节点检测时检查 KV 盘的间隔和超时时间。如果 KVDB 和 RaftDB 使用相同的挂载路径,该值将被覆盖为 0(不检测)
+ TiKV 进行慢节点检测时检查 KV 盘的间隔和超时时间。如果 KVDB 和 RaftDB 使用相同的挂载路径,该值将被覆盖为 0,表示不进行检测

### enable-multi-batch-write <span class="version-mark">从 v6.2.0 版本开始引入</span>

+ 开启 RocksDB 写入优化,将 WriteBatch 中的内容并发写入到 memtable 中,缩短写入耗时。
+ 默认值:无,但在默认情况下会自动开启,除非手动设置成 false 或者开启 `rocksdb.enable-pipelined-write``rocksdb.enable-unordered-write`
Copy link

Choose a reason for hiding this comment

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

默认值的描述不够清晰,建议明确说明默认行为以及与其他配置项的关系。

Suggested change
+ 默认值:无,但在默认情况下会自动开启,除非手动设置成 false 或者开启 `rocksdb.enable-pipelined-write``rocksdb.enable-unordered-write`
默认值:无,但在默认情况下会自动开启,除非手动设置成 `false` 或者同时开启了 `rocksdb.enable-pipelined-write``rocksdb.enable-unordered-write`

## rocksdb.defaultcf | rocksdb.writecf | rocksdb.lockcf
## rocksdb.defaultcf | rocksdb.writecf | rocksdb.lockcf | rocksdb.raftcf

rocksdb defaultcf、rocksdb writecf 和 rocksdb lockcf 相关的配置项。
Copy link

Choose a reason for hiding this comment

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

该行描述不完整,未提及新增的 rocksdb.raftcf 配置项。建议明确列出所有配置项,以便用户全面了解。

Suggested change
rocksdb defaultcf、rocksdb writecf 和 rocksdb lockcf 相关的配置项。
rocksdb defaultcf、rocksdb writecf、rocksdb lockcf 和 rocksdb raftcf 相关的配置项。


### `max-compactions` <span class="version-mark">从 v6.6.0 版本开始引入</span>

+ 最大 compaction 任务并发数。0 表示不限制。
Copy link

Choose a reason for hiding this comment

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

该描述不够清晰,建议明确说明 max-compactions 的具体作用和影响。

Suggested change
+ 最大 compaction 任务并发数。0 表示不限制。
+ 最大 compaction 任务并发数。0 表示不限制。该配置项用于控制 TiKV 同时执行的 compaction 任务数量,过多的并发可能会影响系统性能。


### `compression-level` <span class="version-mark">从 v7.4.0 版本开始引入</span>

+ 设置 raft-engine 在写 raft log 文件时所采用的 lz4 压缩算法的压缩效率,范围 [1, 16],越低压缩速率越高,但压缩率越低。
Copy link

Choose a reason for hiding this comment

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

该句描述不够清晰,建议明确说明压缩效率和压缩率的关系,并补充对默认值的解释。

Suggested change
+ 设置 raft-engine 在写 raft log 文件时所采用的 lz4 压缩算法的压缩效率,范围 [1, 16],越低压缩速率越高,但压缩率越低。
+ 设置 raft-engine 在写 raft log 文件时所采用的 lz4 压缩算法的压缩效率,范围 [1, 16]。数值越低,压缩速率越高,但压缩率越低;数值越高,压缩速率越低,但压缩率越高。默认值 1 表示优先考虑压缩速率

+ 是否开启内存引擎以加速多版本查询。关于内存引擎的详细信息,参见 [TiKV MVCC 内存引擎](/tikv-in-memory-engine.md)
+ 默认值:false(即关闭内存引擎)
+ 建议 TiKV 节点至少配置 8 GiB 内存,推荐配置 32 GiB 或更多内存以获得更佳性能。
Copy link

Choose a reason for hiding this comment

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

建议将内存配置要求与默认值分开描述,以提高可读性。

Suggested change
+ 建议 TiKV 节点至少配置 8 GiB 内存,推荐配置 32 GiB 或更多内存以获得更佳性能。
默认值:false(即关闭内存引擎)
建议 TiKV 节点至少配置 8 GiB 内存,推荐配置 32 GiB 或更多内存以获得更佳性能。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants