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

config: Add index limit configuration #21192

Merged
merged 8 commits into from
Dec 2, 2020

Conversation

b41sh
Copy link
Member

@b41sh b41sh commented Nov 23, 2020

What problem does this PR solve?

Problem Summary:

What is changed and how it works?

What's Changed:

In order to be compatible with MySQL, we set up a table to have up to 64 indexes in PR 20353. But in some cases, we need more indexes, such as some test cases of TiSpark 1730.
In this PR, we add a configuration item that allows users to specify the index limit themselves.

How it Works:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:

Check List

Tests

  • Unit test
  • Integration test

Release note

  • Support setting index limit by configuration.

@b41sh
Copy link
Member Author

b41sh commented Nov 23, 2020

/run-unit-test

@b41sh
Copy link
Member Author

b41sh commented Nov 23, 2020

/run-test

@bb7133 bb7133 added the type/enhancement The issue or PR belongs to an enhancement. label Nov 23, 2020
@bb7133
Copy link
Member

bb7133 commented Nov 23, 2020

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 23, 2020
@bb7133
Copy link
Member

bb7133 commented Nov 23, 2020

PTAL @marsishandsome

@bb7133
Copy link
Member

bb7133 commented Nov 23, 2020

PTAL @wjhuang2016, @AilinKid

Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@@ -644,6 +649,7 @@ var defaultConf = Config{
EnableBatchDML: false,
CheckMb4ValueInUTF8: true,
MaxIndexLength: 3072,
IndexLimit: 64,
Copy link
Contributor

Choose a reason for hiding this comment

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

better use DefIndexLimit here

Copy link
Member Author

Choose a reason for hiding this comment

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

We use DefIndexLimit as a constant. I think it is ok to use IndexLimit here, as other configuration items do not start with Def @AilinKid

Copy link
Member

@wjhuang2016 wjhuang2016 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 24, 2020
@bb7133
Copy link
Member

bb7133 commented Nov 26, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 26, 2020
@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 21115

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@b41sh merge failed.

@bb7133
Copy link
Member

bb7133 commented Nov 26, 2020

/run-all-tests

@bb7133
Copy link
Member

bb7133 commented Nov 28, 2020

/run-unit-test

@bb7133
Copy link
Member

bb7133 commented Dec 2, 2020

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 21421

@ti-srebot
Copy link
Contributor

/run-all-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants