Skip to content
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, sessionctx: enable indexMerge by default #29617

Closed

Conversation

Yui-Song
Copy link
Contributor

@Yui-Song Yui-Song commented Nov 9, 2021

enable tidb_enable_index_merge by default

What problem does this PR solve?

Issue Number: close #29597

Problem Summary:

What is changed and how it works?

Enable tidb_enable_index_merge by default

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

Change tidb_enable_index_merge to "on"

enable tidb_enable_index_merge by default
@Yui-Song Yui-Song requested a review from a team as a code owner November 9, 2021 11:09
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 9, 2021
@CLAassistant
Copy link

CLAassistant commented Nov 9, 2021

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 9, 2021
@Yui-Song Yui-Song requested a review from winoros November 9, 2021 11:10
@sre-bot
Copy link
Contributor

sre-bot commented Nov 9, 2021

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what is changed

Or if the count of mainly changed packages are more than 3, use

  • *: what is changed

After you have format title, you can leave a comment /run-check_title to recheck it

@Yui-Song Yui-Song requested a review from qw4990 November 9, 2021 11:10
@Yui-Song Yui-Song changed the title planner, sessionctx: enable tidb_enable_index_merge by default planner, sessionctx: enable indexMerge by default Nov 9, 2021
@Yui-Song
Copy link
Contributor Author

Yui-Song commented Nov 9, 2021

/run-check_title

@@ -1075,7 +1075,7 @@ var defaultSysVars = []*SysVar{
s.SetEnableCascadesPlanner(TiDBOptOn(val))
return nil
}},
{Scope: ScopeGlobal | ScopeSession, Name: TiDBEnableIndexMerge, Value: Off, Type: TypeBool, SetSession: func(s *SessionVars, val string) error {
{Scope: ScopeGlobal | ScopeSession, Name: TiDBEnableIndexMerge, Value: On, Type: TypeBool, SetSession: func(s *SessionVars, val string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

This will only change the default for new installations. I believe this is fine, but I will wait for you to confirm (and update the release note).

If you'd like to change for existing installs, a bootstrap task is needed (session/bootstrap.go).

Choose a reason for hiding this comment

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

(1) Please make sure this works for 4.0 to 5.0 upgrade too, since from analyze-2.0 feature we found it only works for intra-5.0 upgrade but does not work for the 4.0 to 5.0 upgrade which changes the default anyway no matter it is existing or new installs;
(2) Also @guo-shaoge is working on GA index merge in Sprint 6. I'd suggest to make this change together with index merge GA feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think just change the default for new installations is enough. Change for existing installs will results in plan changes, which will give the user "surprise". That's not what I expected.
And I will talk to @guo-shaoge later.

Choose a reason for hiding this comment

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

The problem here is that approach we identify whether it's an existing or new install only works for 5.x but not 4.x, which means all the existing system from 4.x will be impacted and default will be changed after upgrading to 5.x.

Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. config, session: promise the compatibility of oom-action when upgrading #22102 changed the default oom-action, which works for all situations(3.0 to 4.0 and 4.0 to 5.0).
    But oom-action is a config item, I am not sure it works for sysvars.
  2. IMO, it's better to enable index merge after it's official GA. We are working on it.

@guo-shaoge
Copy link
Collaborator

/run-common-test
/run-integration-copr-test
/run-integration-common-test

@ti-chi-bot
Copy link
Member

@Yui-Song: PR needs rebase.

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.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 31, 2021
@guo-shaoge
Copy link
Collaborator

Enabled here: #30650 . Guess we can close this pr @Yui-Song

@Yui-Song Yui-Song closed this Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

enable tidb_enable_index_merge by default
7 participants