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

executor: fix the bug of step value overflow when split regions #23206

Closed
wants to merge 7 commits into from

Conversation

sourcelliu
Copy link
Contributor

@sourcelliu sourcelliu commented Mar 9, 2021

Signed-off-by: mantuliu 240951888@qq.com

What problem does this PR solve?

Issue Number: close #23159

Problem Summary:

What is changed and how it works?

How it Works:
Use math/big package.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn: no
  • Need to cherry-pick to the release branch: yes

Check List

Tests

  • Unit test
  • Integration test

Release note

  • Fix the bug of step value overflow when split regions.

Signed-off-by: mantuliu <240951888@qq.com>
@sourcelliu sourcelliu requested a review from a team as a code owner March 9, 2021 09:28
@sourcelliu sourcelliu requested review from wshwsh12 and removed request for a team March 9, 2021 09:28
@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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 9, 2021
@sre-bot
Copy link
Contributor

sre-bot commented Mar 9, 2021

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what's changed

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

  • *: what's changed

@sre-bot
Copy link
Contributor

sre-bot commented Mar 9, 2021

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what's changed

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

  • *: what's changed

@github-actions github-actions bot added the sig/execution SIG execution label Mar 9, 2021
@ichn-hu ichn-hu mentioned this pull request Mar 9, 2021
@sourcelliu sourcelliu changed the title Fix the bug of step value overflow when split regions executor: fix the bug of step value overflow when split regions Mar 10, 2021
@sourcelliu
Copy link
Contributor Author

@wshwsh12 PTAL thanks.

handleCols: core.NewIntHandleCols(&expression.Column{RetType: types.NewFieldType(mysql.TypeLonglong)}),
lower: []types.Datum{types.NewDatum(-9223372036854775808)},
upper: []types.Datum{types.NewDatum(9223372036854775807)},
num: 4,
Copy link

Choose a reason for hiding this comment

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

What happens when REGIONS 1 is given?

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 add some edge test. And in the Integration Testing, the mysql client get the result:

mysql> create table if not exists `t1` (`id` bigint);
Query OK, 0 rows affected (0.00 sec)

mysql> split table `t1` between (-9223372036854775808) and (9223372036854775807) regions 1;
ERROR 1105 (HY000): Split table `t1` region step value should more than 1000, step -1 is invalid

@AilinKid
Copy link
Contributor

why close it? @mantuliu

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 16, 2021
@ti-chi-bot
Copy link
Member

@mantuliu: 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.

@sourcelliu
Copy link
Contributor Author

@AilinKid #21277 fix it

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. sig/execution SIG execution 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.

Step value overflowed on split command
5 participants