Skip to content

Conversation

@hhwyt
Copy link
Contributor

@hhwyt hhwyt commented Jan 7, 2026

What is changed, added or deleted? (Required)

ref tikv/tikv#18994

Update documentation for storage.flow-control.l0-files-threshold and storage.flow-control.soft-pending-compaction-bytes-limit to reflect the behavior change introduced in TiKV PR #18994.

  • v8.5.4 and earlier: flow-control config unconditionally overrides the corresponding RocksDB config.
  • From v8.5.5: flow-control config only overrides when it is smaller than the RocksDB config, to avoid weakening RocksDB's compaction acceleration mechanism when increasing flow-control thresholds.

Also update the corresponding RocksDB config items (level0-slowdown-writes-trigger, soft-pending-compaction-bytes-limit) with the same version-specific behavior notes.

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

  • master (the latest development version)
  • v8.5 (TiDB 8.5 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)?

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

….5.5

Update documentation for storage.flow-control.l0-files-threshold and
storage.flow-control.soft-pending-compaction-bytes-limit to reflect
the behavior change introduced in TiKV PR pingcap#18994.

- v8.5.4 and earlier: flow-control config unconditionally overrides
  the corresponding RocksDB config.
- From v8.5.5: flow-control config only overrides when it is smaller
  than the RocksDB config, to avoid weakening RocksDB's compaction
  acceleration mechanism when increasing flow-control thresholds.

Also update the corresponding RocksDB config items
(level0-slowdown-writes-trigger, soft-pending-compaction-bytes-limit)
with the same version-specific behavior notes.
@ti-chi-bot ti-chi-bot bot added the contribution This PR is from a community contributor. label Jan 7, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 7, 2026

Hi @hhwyt. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot added needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 7, 2026
@hhwyt
Copy link
Contributor Author

hhwyt commented Jan 7, 2026

/cc @qiancai @hbisheng PTAL, thx~

@qiancai qiancai self-assigned this Jan 7, 2026
@qiancai qiancai added the translation/doing This PR’s assignee is translating this PR. label Jan 7, 2026
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Jan 7, 2026
@qiancai
Copy link
Collaborator

qiancai commented Jan 7, 2026

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Jan 7, 2026
@qiancai qiancai added needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3. labels Jan 7, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 7, 2026

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

Details

In response to this:

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-sigs/prow repository.

Copy link
Collaborator

@qiancai qiancai left a comment

Choose a reason for hiding this comment

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

Rest LGTM

Comment on lines 568 to 569
+ v8.5.4 及之前版本:当 `enable` 的值为 `true` 时,该配置会直接覆盖 `rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger`
+ 从 v8.5.5 起:当 `enable` 的值为 `true` 时,仅当 `storage.flow-control.l0-files-threshold` 小于 `rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger` 时才覆盖该 RocksDB 配置项,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制。
Copy link
Collaborator

@qiancai qiancai Jan 9, 2026

Choose a reason for hiding this comment

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

Suggested change
+ v8.5.4 及之前版本:`enable` 的值为 `true` 时,该配置会直接覆盖 `rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger`
+ 从 v8.5.5 起:当 `enable` 的值为 `true` 时,仅当 `storage.flow-control.l0-files-threshold` 小于 `rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger` 时才覆盖该 RocksDB 配置项,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制。
+ v8.5.4 及之前版本:当开启流控机制([`enable`](/tikv-configuration-file.md#enable) `true`时,该配置会直接覆盖 [`rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger`](/tikv-configuration-file.md#level0-slowdown-writes-trigger)
+ 从 v8.5.5 和 v9.0.0 起:当开启流控机制([`enable`](/tikv-configuration-file.md#enable) `true`)时,该配置仅在其值小于 [`rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger`](/tikv-configuration-file.md#level0-slowdown-writes-trigger) 时才覆盖 `rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger`,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制。

Copy link
Collaborator

@qiancai qiancai Jan 9, 2026

Choose a reason for hiding this comment

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

要考虑另一种描述方式吗,就是直接让用户参考下面那个配置项的描述也可以?这样避免一旦版本逻辑变更,需要改四处地方。

Suggested change
+ v8.5.4 及之前版本:当 `enable` 的值为 `true` 时,该配置会直接覆盖 `rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger`
+ 从 v8.5.5 起:当 `enable` 的值为 `true` 时,仅当 `storage.flow-control.l0-files-threshold` 小于 `rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger` 时才覆盖该 RocksDB 配置项,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制。
> **注意**
>
> 当满足一定条件时,`rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger` 的值会被该配置项覆盖。详细参考 [`rocksdb.(defaultcf|writecf|lockcf).level0-slowdown-writes-trigger`](/tikv-configuration-file.md#level0-slowdown-writes-trigger)

Comment on lines 575 to 576
+ v8.5.4 及之前版本:当 `enable` 的值为 `true` 时,该配置会直接覆盖 `rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit`
+ 从 v8.5.5 起:当 `enable` 的值为 `true` 时,仅当 `storage.flow-control.soft-pending-compaction-bytes-limit` 小于 `rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit` 时才覆盖该 RocksDB 配置项,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制。
Copy link
Collaborator

@qiancai qiancai Jan 9, 2026

Choose a reason for hiding this comment

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

Suggested change
+ v8.5.4 及之前版本:`enable` 的值为 `true` 时,该配置会直接覆盖 `rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit`
+ 从 v8.5.5 起:当 `enable` 的值为 `true` 时,仅当 `storage.flow-control.soft-pending-compaction-bytes-limit` 小于 `rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit` 时才覆盖该 RocksDB 配置项,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制。
+ v8.5.4 及之前版本:当开启流控机制([`enable`](/tikv-configuration-file.md#enable) `true`时,该配置会直接覆盖 [`rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit`](/tikv-configuration-file.md#soft-pending-compaction-bytes-limit-1)
+ 从 v8.5.5 和 v9.0.0 起:当开启流控机制([`enable`](/tikv-configuration-file.md#enable) `true`)时,该配置仅在其值小于 [`rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit`](/tikv-configuration-file.md#soft-pending-compaction-bytes-limit-1) 时才覆盖 `rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit`,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制。

Copy link
Collaborator

@qiancai qiancai Jan 9, 2026

Choose a reason for hiding this comment

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

另一种描述方式

Suggested change
+ v8.5.4 及之前版本:当 `enable` 的值为 `true` 时,该配置会直接覆盖 `rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit`
+ 从 v8.5.5 起:当 `enable` 的值为 `true` 时,仅当 `storage.flow-control.soft-pending-compaction-bytes-limit` 小于 `rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit` 时才覆盖该 RocksDB 配置项,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制。
> **注意**
>
> 当满足一定条件时,`rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit` 的值会被该配置项覆盖。详细参考 [`rocksdb.(defaultcf|writecf|lockcf).soft-pending-compaction-bytes-limit`](/tikv-configuration-file.md#soft-pending-compaction-bytes-limit-1。

Comment on lines 1644 to 1645
+ v8.5.4 及之前版本:当 `storage.flow-control.enable` 的值为 `true` 时,该配置项会被 `storage.flow-control.l0-files-threshold` 直接覆盖。
+ 从 v8.5.5 起:当 `storage.flow-control.enable` 的值为 `true` 时,如果本配置项的值大于 `storage.flow-control.l0-files-threshold`,则本配置项会被 `storage.flow-control.l0-files-threshold` 覆盖;否则保持本配置不变。
Copy link
Collaborator

@qiancai qiancai Jan 9, 2026

Choose a reason for hiding this comment

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

Suggested change
+ v8.5.4 及之前版本:`storage.flow-control.enable` 的值为 `true` 时,该配置项会被 `storage.flow-control.l0-files-threshold` 直接覆盖。
+ 从 v8.5.5 起:当 `storage.flow-control.enable` 的值为 `true` 时,如果本配置项的值大于 `storage.flow-control.l0-files-threshold`,则本配置项会被 `storage.flow-control.l0-files-threshold` 覆盖;否则保持本配置不变
+ v8.5.4 及之前版本:当开启流控机制([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) `true`时,该配置项会被 [`storage.flow-control.l0-files-threshold`](/tikv-configuration-file.md#l0-files-threshold) 直接覆盖。
+ 从 v8.5.5 和 v9.0.0 起:当开启流控机制([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) `true`)时,该配置项仅在其值大于 [`storage.flow-control.l0-files-threshold`](/tikv-configuration-file.md#l0-files-threshold 时会被 `storage.flow-control.l0-files-threshold` 覆盖,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制

Comment on lines 1703 to 1704
+ v8.5.4 及之前版本:当 `storage.flow-control.enable` 的值为 `true` 时,该配置项会被 `storage.flow-control.soft-pending-compaction-bytes-limit` 直接覆盖。
+ 从 v8.5.5 起:当 `storage.flow-control.enable` 的值为 `true` 时,如果本配置项的值大于 `storage.flow-control.soft-pending-compaction-bytes-limit`,则本配置项会被 `storage.flow-control.soft-pending-compaction-bytes-limit` 覆盖;否则保持本配置不变。
Copy link
Collaborator

@qiancai qiancai Jan 9, 2026

Choose a reason for hiding this comment

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

Suggested change
+ v8.5.4 及之前版本:`storage.flow-control.enable` 的值为 `true` 时,该配置项会被 `storage.flow-control.soft-pending-compaction-bytes-limit` 直接覆盖。
+ 从 v8.5.5 起:当 `storage.flow-control.enable` 的值为 `true` 时,如果本配置项的值大于 `storage.flow-control.soft-pending-compaction-bytes-limit`,则本配置项会被 `storage.flow-control.soft-pending-compaction-bytes-limit` 覆盖;否则保持本配置不变
+ v8.5.4 及之前版本:当开启流控机制([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) `true`时,该配置项会被 [`storage.flow-control.soft-pending-compaction-bytes-limit`](/tikv-configuration-file.md#soft-pending-compaction-bytes-limit) 直接覆盖。
+ 从 v8.5.5 和 v9.0.0 起:当开启流控机制([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) `true`)时,该配置项仅在其值大于 [`storage.flow-control.soft-pending-compaction-bytes-limit`](/tikv-configuration-file.md#soft-pending-compaction-bytes-limit) 时会被 `storage.flow-control.soft-pending-compaction-bytes-limit` 覆盖,以避免在调大流控阈值时削弱 RocksDB 的 compaction 加速机制

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 9, 2026
Use reference-based approach to avoid duplication:
- In flow-control config items, use brief note block to reference RocksDB config items
- In RocksDB config items, keep detailed version-specific behavior with links

This makes future version logic changes easier to maintain (only 2 places instead of 4).

Signed-off-by: hhwyt <[email protected]>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 9, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from qiancai. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hhwyt
Copy link
Contributor Author

hhwyt commented Jan 9, 2026

/ok-to-test

@hhwyt
Copy link
Contributor Author

hhwyt commented Jan 9, 2026

@qiancai PTAL again, thx~

github-actions bot added a commit to qiancai/docs that referenced this pull request Jan 12, 2026
Synced from: pingcap/docs-cn#21244
Target PR: pingcap#22296
AI Provider: gemini

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 12, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 12, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-01-09 04:46:40.368246435 +0000 UTC m=+936756.186554867: ☑️ agreed by qiancai.
  • 2026-01-12 07:09:53.226845049 +0000 UTC m=+255037.288709958: ☑️ agreed by Oreoxmt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution This PR is from a community contributor. lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. ok-to-test Indicates a PR is ready to be tested. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. translation/doing This PR’s assignee is translating this PR. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants