docs
docs copied to clipboard
Add circuit breaker variable
First-time contributors' checklist
- [ ] I've signed Contributor License Agreement that's required for repo owners to accept my contribution.
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.
- [x] 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): https://github.com/tikv/pd/issues/8678, https://github.com/pingcap/tidb/issues/58780
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
/hold
@benmeadowcroft: adding LGTM is restricted to approvers and reviewers in OWNERS files.
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.
@benmeadowcroft: adding LGTM is restricted to approvers and reviewers in OWNERS files.
In response to this:
Let's make it a bit clearer how this should be set and the meaning.
E.g. perhaps updating to:
This variable is used to control when TiDB triggers the circuit breaker. If set to
0(the default) then the circuit breaker is disabled. If the variable is set to1to100then the circuit breaker is triggered if the error rate percentage, of the specific requests sent to PD, meets or exceeds the threshold.
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.
I am also confused why we are using Range: [0, 100] for this variable instead of Range: [0.0, 1.0] as we have done for other ratio/percentage based thresholds in this configuration file.
Maybe we can change it to [0, 1]? /cc @tema @niubell @okJiang
@rleungx: GitHub didn't allow me to request PR reviews from the following users: tema.
Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.
In response to this:
Maybe we can change it to [0, 1]? /cc @tema @niubell @okJiang
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.
Maybe we can change it to [0, 1]? /cc @Tema @niubell @okJiang
LGTM
@benmeadowcroft: adding LGTM is restricted to approvers and reviewers in OWNERS files.
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.
Maybe we can change it to [0, 1]? /cc @Tema @niubell @okJiang
@rleungx I don't mind the pct/ratio, but I wish you changed the name as well. The _pct suffix in the name meant to mean percentage. Now it is a bit confusing.
cc: @benmeadowcroft
AFAIK, we have another variable tidb_instance_plan_cache_reserved_percentage which uses the percentage as the suffix. And its range is [0, 1]. See https://docs.pingcap.com/tidb/stable/system-variables/#tidb_instance_plan_cache_reserved_percentage-new-in-v840. /cc @benmeadowcroft
@rleungx my primary interest is consistency so my suggestion to address the feedback from @Tema would be to either (1) spell out the abbreviation fully, e.g. tidb_cb_pd_metadata_error_rate_threshold_percentage, or (2) use the suffix _ratio for this variable.
Looking over the set of variables provided it looks like there is 1 instance of *_percentage and 6 instances of *_ratio so my preference would be to use the latter.
change to tidb_cb_pd_metadata_error_rate_threshold_ratio.
/hold cancel
[LGTM Timeline notifier]
Timeline:
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: hfxsd
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [hfxsd]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment