-
Notifications
You must be signed in to change notification settings - Fork 709
tikv-configuration-file: update flow-control override behavior for v8.5.5 (#22296) #22310
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
base: release-8.5
Are you sure you want to change the base?
tikv-configuration-file: update flow-control override behavior for v8.5.5 (#22296) #22310
Conversation
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>
Co-authored-by: Aolin <aolinz@outlook.com>
Summary of ChangesHello @ti-chi-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the TiKV configuration documentation to accurately describe the revised interaction between TiKV's flow control parameters and RocksDB's internal compaction thresholds. It clarifies a critical behavior change introduced in TiKV v8.5.5, where flow control settings now conditionally override RocksDB settings to prevent unintended performance degradation. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the documentation for storage.flow-control.l0-files-threshold and storage.flow-control.soft-pending-compaction-bytes-limit to reflect a behavior change starting from TiKV v8.5.5. The changes correctly centralize the detailed override logic in the corresponding RocksDB configuration sections and add version-specific notes. My review focuses on improving the clarity of the new explanations. I've provided two suggestions to rephrase sentences that could be confusing, making the behavior easier to understand for users.
| + The maximum number of files at L0 that trigger write stall. When `storage.flow-control.enable` is set to `true`, `storage.flow-control.l0-files-threshold` overrides this configuration item. | ||
| + The maximum number of files at L0 that trigger write stall. | ||
| + In v8.5.4 and earlier versions: when the flow control mechanism is enabled ([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) is `true`), the value of this configuration item is directly overridden by [`storage.flow-control.l0-files-threshold`](/tikv-configuration-file.md#l0-files-threshold). | ||
| + Starting from v8.5.5 and v9.0.0: when the flow control mechanism is enabled ([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) is `true`), the value of this configuration item is overridden by [`storage.flow-control.l0-files-threshold`](/tikv-configuration-file.md#l0-files-threshold) only when its value is greater than `storage.flow-control.l0-files-threshold`. This behavior prevents weakening RocksDB's compaction acceleration mechanism when you increase the flow control threshold. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve clarity, I suggest rephrasing this sentence to explain what the effective value will be. This avoids a potentially confusing self-reference and makes the behavior easier for users to understand.
| + Starting from v8.5.5 and v9.0.0: when the flow control mechanism is enabled ([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) is `true`), the value of this configuration item is overridden by [`storage.flow-control.l0-files-threshold`](/tikv-configuration-file.md#l0-files-threshold) only when its value is greater than `storage.flow-control.l0-files-threshold`. This behavior prevents weakening RocksDB's compaction acceleration mechanism when you increase the flow control threshold. | |
| + Starting from v8.5.5 and v9.0.0: when the flow control mechanism is enabled ([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) is `true`), the effective threshold for write stall is the smaller value between this configuration item and [`storage.flow-control.l0-files-threshold`](/tikv-configuration-file.md#l0-files-threshold). This behavior prevents weakening RocksDB's compaction acceleration mechanism when you increase the flow control threshold. |
References
- The documentation should be clear, simple, and easy for users to understand. If something might be confusing, it should be reworded. (link)
| + The soft limit on the pending compaction bytes. When `storage.flow-control.enable` is set to `true`, `storage.flow-control.soft-pending-compaction-bytes-limit` overrides this configuration item. | ||
| + The soft limit on the pending compaction bytes. | ||
| + In v8.5.4 and earlier versions: when the flow control mechanism is enabled ([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) is `true`), this configuration item is directly overridden by [`storage.flow-control.soft-pending-compaction-bytes-limit`](/tikv-configuration-file.md#soft-pending-compaction-bytes-limit). | ||
| + Starting from v8.5.5 and v9.0.0: when the flow control mechanism is enabled ([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) is `true`), this configuration item is overridden by [`storage.flow-control.soft-pending-compaction-bytes-limit`](/tikv-configuration-file.md#soft-pending-compaction-bytes-limit) only when its value is greater than `storage.flow-control.soft-pending-compaction-bytes-limit`. This behavior prevents weakening RocksDB's compaction acceleration mechanism when you increase the flow control threshold. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve clarity, especially since the two parameter names are very similar, I suggest rephrasing this sentence to explain what the effective value will be. This avoids a potentially confusing self-reference and makes the behavior easier for users to understand.
| + Starting from v8.5.5 and v9.0.0: when the flow control mechanism is enabled ([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) is `true`), this configuration item is overridden by [`storage.flow-control.soft-pending-compaction-bytes-limit`](/tikv-configuration-file.md#soft-pending-compaction-bytes-limit) only when its value is greater than `storage.flow-control.soft-pending-compaction-bytes-limit`. This behavior prevents weakening RocksDB's compaction acceleration mechanism when you increase the flow control threshold. | |
| + Starting from v8.5.5 and v9.0.0: when the flow control mechanism is enabled ([`storage.flow-control.enable`](/tikv-configuration-file.md#enable) is `true`), the effective soft limit for pending compaction bytes is the smaller value between this configuration item and [`storage.flow-control.soft-pending-compaction-bytes-limit`](/tikv-configuration-file.md#soft-pending-compaction-bytes-limit). This behavior prevents weakening RocksDB's compaction acceleration mechanism when you increase the flow control threshold. |
References
- The documentation should be clear, simple, and easy for users to understand. If something might be confusing, it should be reworded. (link)
This is an automated cherry-pick of #22296
What is changed, added or deleted? (Required)
ref tikv/tikv#18994
Update documentation for
storage.flow-control.l0-files-thresholdandstorage.flow-control.soft-pending-compaction-bytes-limitto reflect the behavior change introduced in TiKV PR #18994.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)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?