-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
parser,ddl: add background job syntax and meta management for resource control #45189
Conversation
Hi @glorv. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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/test-infra repository. |
} | ||
|
||
DirectResourceGroupBackgroundOption: | ||
"TASK_NAMES" EqOpt stringLit |
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.
Is the task name an enumeration type? I find PD and TiDB won't check whether name is valid, user can't get feedback if the name is wrong.
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.
Yes, you can check the enum here. @CabinfeverB
https://github.com/tikv/client-go/pull/868/files#diff-6bd1a8e867c588123e135e97a8474639b648d9b6e4ab28c5b29338b388505dfbR41
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.
My main concern is that when setting the backgroup, if the user input is wrong, it will not report an error.
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.
Added a check in ddl api
@CabinfeverB @HuSharp @nolouch PTAL again, thanks |
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
} | ||
} | ||
case ast.ResourceGroupBackground: | ||
if groupInfo.Name.L != rg.DefaultResourceGroupName { |
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.
I noticed this restriction, so maybe need to update pr description?
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.
There is a NOTE
in the PR description.
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.
oops, sorrrry! I must be blind!
parser/ast/ddl.go
Outdated
ctx.WritePlain(", ") | ||
} | ||
if err := option.Restore(ctx); err != nil { | ||
return errors.Annotatef(err, "An error occurred while splicing ResourceGroup Background Option") |
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.
Do we need to unify error with ResourceGroupRunaway
to expose i
?
return errors.Annotatef(err, "An error occurred while splicing ResourceGroup Background Option") | |
return errors.Annotatef(err, "An error occurred while splicing ResourceGroup Background Option: [%v]", i") |
parser/ast/ddl.go
Outdated
ctx.WritePlain(" ") | ||
} | ||
if err := option.Restore(ctx); err != nil { | ||
return errors.Annotatef(err, "An error occurred while splicing CreateResourceGroupStmt Option: [%v]", i) |
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.
return errors.Annotatef(err, "An error occurred while splicing CreateResourceGroupStmt Option: [%v]", i) | |
return errors.Annotatef(err, "An error occurred while splicing ResourceGroupRunaway Option: [%v]", i) |
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.
merge master failed, rest LGTM!
@HuSharp: 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/test-infra repository. |
@glorv: The following test failed, say
Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
/retest |
@glorv: Cannot trigger testing until a trusted user reviews the PR and leaves an 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/test-infra repository. |
@glorv: Cannot trigger testing until a trusted user reviews the PR and leaves an 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3pointer, HuSharp, nolouch The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
@glorv: The following test failed, say
Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
/unhold |
What problem does this PR solve?
Issue Number: ref #44517
Problem Summary:
What is changed and how it works?
Resource control add new syntax for background tasks management as following:
NOTE: in the first phase, we only support changing the
default
resource group's background config.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.