-
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
planner: ban baseline evolution feature #26333
planner: ban baseline evolution feature #26333
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. |
/label sig/planner |
@Reminiscent: The label(s) 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. |
/cc @eurekaka |
/rebuild |
…aselineEvolution
…aselineEvolution
/label epic/sql-plan-management |
@eurekaka: The label(s) 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. |
executor/set.go
Outdated
@@ -108,6 +109,10 @@ func (e *SetExecutor) setSysVariable(ctx context.Context, name string, v *expres | |||
if sysVar == nil { | |||
return variable.ErrUnknownSystemVar.GenWithStackByArgs(name) | |||
} | |||
// The 'baseline evolution' only work in the CI environment before the feature is GA. | |||
if sysVar.Name == "tidb_evolve_plan_baselines" && !config.CheckTableBeforeDrop { |
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.
We should check the target value is on
before reporting error, otherwise, if the users have already enabled this feature, they cannot disable the feature anymore.
executor/set.go
Outdated
@@ -108,6 +109,10 @@ func (e *SetExecutor) setSysVariable(ctx context.Context, name string, v *expres | |||
if sysVar == nil { | |||
return variable.ErrUnknownSystemVar.GenWithStackByArgs(name) | |||
} | |||
// The 'baseline evolution' only work in the CI environment before the feature is GA. | |||
if sysVar.Name == "tidb_evolve_plan_baselines" && !config.CheckTableBeforeDrop { | |||
return errors.Errorf("The 'baseline evolution' of TiDB has not been GA yet, so it is forbidden to use it.") |
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.Errorf("The 'baseline evolution' of TiDB has not been GA yet, so it is forbidden to use it.") | |
return errors.Errorf("Cannot enable baseline evolution feature, it is not generally available now") |
…aselineEvolution
…ent/tidb into forbidBaselineEvolution
@eurekaka Update. PTAL |
session/session.go
Outdated
@@ -1143,6 +1143,9 @@ func (s *session) SetGlobalSysVar(name, value string) (err error) { | |||
if value, err = sv.Validate(s.sessionVars, value, variable.ScopeGlobal); err != nil { | |||
return err | |||
} | |||
if sv.Name == "tidb_evolve_plan_baselines" && strings.EqualFold("ON", value) && !config.CheckTableBeforeDrop { |
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.
And are sv.Name
and value
standardized here? What if tidb_EVOLVE_plan_baselines
or on
?
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 0a8ef1e
|
/run-all-tests |
1 similar comment
/run-all-tests |
…ent/tidb into forbidBaselineEvolution
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 9c6f681
|
@Reminiscent: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests 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. |
What problem does this PR solve?
Issue Number: close issue#26330
Problem Summary:
Ban the
baseline evolution
feature before the feature is GA.What is changed and how it works?
Check List
Tests
Documentation
Release note