Skip to content

session: change the variable range of circuit breaker#61613

Merged
ti-chi-bot[bot] merged 1 commit intopingcap:masterfrom
rleungx:change-range
Jun 10, 2025
Merged

session: change the variable range of circuit breaker#61613
ti-chi-bot[bot] merged 1 commit intopingcap:masterfrom
rleungx:change-range

Conversation

@rleungx
Copy link
Member

@rleungx rleungx commented Jun 10, 2025

What problem does this PR solve?

Issue Number: close #61614

Problem Summary:

What changed and how does it work?

mysql> show variables like 'tidb_cb_pd%';
+----------------------------------------------+-------+
| Variable_name                                | Value |
+----------------------------------------------+-------+
| tidb_cb_pd_metadata_error_rate_threshold_pct | 0     |
+----------------------------------------------+-------+
1 row in set (0.00 sec)

mysql> set global tidb_cb_pd_metadata_error_rate_threshold_pct = 100;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> show warnings;
+---------+------+-------------------------------------------------------------------------------+
| Level   | Code | Message                                                                       |
+---------+------+-------------------------------------------------------------------------------+
| Warning | 1292 | Truncated incorrect tidb_cb_pd_metadata_error_rate_threshold_pct value: '100' |
+---------+------+-------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show variables like 'tidb_cb_pd%';
+----------------------------------------------+-------+
| Variable_name                                | Value |
+----------------------------------------------+-------+
| tidb_cb_pd_metadata_error_rate_threshold_pct | 1     |
+----------------------------------------------+-------+
1 row in set (0.00 sec)

mysql> set global tidb_cb_pd_metadata_error_rate_threshold_pct = -1;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> show warnings;
+---------+------+------------------------------------------------------------------------------+
| Level   | Code | Message                                                                      |
+---------+------+------------------------------------------------------------------------------+
| Warning | 1292 | Truncated incorrect tidb_cb_pd_metadata_error_rate_threshold_pct value: '-1' |
+---------+------+------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show variables like 'tidb_cb_pd%';
+----------------------------------------------+-------+
| Variable_name                                | Value |
+----------------------------------------------+-------+
| tidb_cb_pd_metadata_error_rate_threshold_pct | 0     |
+----------------------------------------------+-------+
1 row in set (0.01 sec)

mysql> set global tidb_cb_pd_metadata_error_rate_threshold_pct = 0.8;
Query OK, 0 rows affected (0.01 sec)

mysql> show variables like 'tidb_cb_pd%';
+----------------------------------------------+-------+
| Variable_name                                | Value |
+----------------------------------------------+-------+
| tidb_cb_pd_metadata_error_rate_threshold_pct | 0.8   |
+----------------------------------------------+-------+
1 row in set (0.00 sec)

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 10, 2025
@rleungx rleungx requested a review from okJiang June 10, 2025 05:22
@rleungx rleungx requested review from lcwangchao and tangenta June 10, 2025 05:25
@rleungx
Copy link
Member Author

rleungx commented Jun 10, 2025

/cc @benmeadowcroft

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 10, 2025

@rleungx: GitHub didn't allow me to request PR reviews from the following users: BenMeadowcroft.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @benmeadowcroft

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.

@codecov
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 73.6626%. Comparing base (51f0587) to head (26f3bc6).
Report is 5 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61613        +/-   ##
================================================
+ Coverage   73.1154%   73.6626%   +0.5472%     
================================================
  Files          1729       1729                
  Lines        481057     482505      +1448     
================================================
+ Hits         351727     355426      +3699     
+ Misses       107801     105603      -2198     
+ Partials      21529      21476        -53     
Flag Coverage Δ
integration 42.5780% <66.6666%> (?)
unit 72.5369% <66.6666%> (+0.1710%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 47.1684% <ø> (+0.1792%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 10, 2025
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 10, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 10, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-06-10 06:14:38.158227527 +0000 UTC m=+335656.386542787: ☑️ agreed by tangenta.
  • 2025-06-10 06:47:38.839808038 +0000 UTC m=+337637.068123301: ☑️ agreed by okJiang.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benmeadowcroft, okJiang, tangenta

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

The pull request process is described 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

@ti-chi-bot ti-chi-bot bot added the approved label Jun 10, 2025
@ti-chi-bot ti-chi-bot bot merged commit c2e5dd3 into pingcap:master Jun 10, 2025
22 of 24 checks passed
Copy link

@yudongusa yudongusa left a comment

Choose a reason for hiding this comment

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

Please also open a document PR.

@rleungx
Copy link
Member Author

rleungx commented Jun 11, 2025

@yudongusa We already had one pingcap/docs#20129

@rleungx rleungx deleted the change-range branch June 11, 2025 02:28
rleungx added a commit to ti-chi-bot/tidb that referenced this pull request Dec 11, 2025
rleungx added a commit to ti-chi-bot/tidb that referenced this pull request Dec 16, 2025
rleungx added a commit to ti-chi-bot/tidb that referenced this pull request Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change the variable range of circuit breaker

5 participants