-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: add new global variable tidb_enable_resource_control as a switch #40440
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
7063614
to
80ffb7d
Compare
/retest |
2 similar comments
/retest |
/retest |
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.
lgtm
ptal @tiancaiamao @glorv |
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.
Let @@tidb_enable_resource_control control the 'create/alter resource' statement is not the best choice.
Because the user may create resource group first, and then disable the global variable.
In this order, this new added switch is useless.
It's better to make the variable work by avoid setting the tag for the request.
Yes. @glorv's pr #40237 and the coming token controlling pr and write scheduling pr need to honor the flag. @Connor1996 @JmPotato @nolouch |
Whether enabling read/write scheduling is only controlled by TiKV config as I understand. Do we need to consider this global variable? |
@Connor1996 it's better let TiKV config be online change and be associated with this switch or maybe TiKV no need a switch if it can enable by default. IMO, user better only know one switch. But currently it's may difficulty to implement. |
I think the main purpose is not allow user to use the resource group |
After I discuss with @glorv, at the experimental phase, I would like to let the flag affect new sessions. That is to give a "default" group to session context if the flag is disabled. We may need to consolidate the behavior of tidb and tikv later. |
…resource group feature Signed-off-by: BornChanger <[email protected]>
Signed-off-by: BornChanger <[email protected]>
Signed-off-by: BornChanger <[email protected]>
…ble is off Signed-off-by: BornChanger <[email protected]>
Signed-off-by: BornChanger <[email protected]>
194d07c
to
fc45835
Compare
Signed-off-by: BornChanger <[email protected]>
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.
LGTM
b4913b4
to
7f8d2e5
Compare
@tiancaiamao @Connor1996 please take another look. |
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.
LGTM
@bb7133: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. 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 ti-community-infra/tichi repository. |
@glorv: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. 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 ti-community-infra/tichi repository. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 7f8d2e5
|
@BornChanger: Your PR was out of date, I have automatically updated it for you. If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
Signed-off-by: BornChanger [email protected]
What problem does this PR solve?
Issue Number: ref #38825
Problem Summary:
What is changed and how it works?
A new global variable
tidb_enable_resource_control
is introduced via this pr, which is off by default.When it's off, resource group create/drop/alter operations or create/alter user with resource group options are forbidden,
and no resource group tagging is carried in tikv requests.
Check List
Tests
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.