docs: clarify Raft leader lease timing#23287
Conversation
|
Hi @wenxiaojie1. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
There was a problem hiding this comment.
Code Review
This pull request updates the tikv-configuration-file.md documentation to add a constraint for the raft-store-max-leader-lease configuration option. The review feedback suggests rewriting the added sentence in the second person ("you") to align with the repository style guide and removing unnecessary backticks around the numeric literal 1.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| ### `raft-store-max-leader-lease` | ||
|
|
||
| + The longest trusted period of a Raft leader | ||
| + To start TiKV successfully, set this value to no more than `raft-base-tick-interval` * (`raft-election-timeout-ticks` - `1`). |
There was a problem hiding this comment.
According to the repository style guide, we should write in the second person ("you") when addressing users. Additionally, the number 1 in the formula does not need to be in backticks as it is a numeric literal rather than a configuration option or command.
| + To start TiKV successfully, set this value to no more than `raft-base-tick-interval` * (`raft-election-timeout-ticks` - `1`). | |
| + To start TiKV successfully, you must set this value to no more than `raft-base-tick-interval` * (`raft-election-timeout-ticks` - 1). |
References
- Write in second person ("you") when addressing users. (link)
|
/cc @pingyu |
Co-authored-by: Ping Yu <shui.yu@126.com>
|
[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 |
[LGTM Timeline notifier]Timeline:
|
|
Warning Review limit reached
Next review available in: 21 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe TiKV configuration documentation adds a startup constraint for ChangesTiKV configuration documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
What is changed, added or deleted? (Required)
Document the startup constraint for
raft-store-max-leader-lease: its value must leave oneraft-base-tick-intervalbefore the Raft election timeout. This reflects the TiKV configuration validation and helps prevent invalid timing configurations from causing startup failures.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.
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
raft-store-max-leader-lease.