Skip to content

ranger: fix the case which could have duplicate ranges (#24590)#24635

Merged
ti-chi-bot merged 3 commits intopingcap:release-5.0from
ti-srebot:release-5.0-aecff1c42e3a
Jun 21, 2021
Merged

ranger: fix the case which could have duplicate ranges (#24590)#24635
ti-chi-bot merged 3 commits intopingcap:release-5.0from
ti-srebot:release-5.0-aecff1c42e3a

Conversation

@ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented May 13, 2021

cherry-pick #24590 to release-5.0
You can switch your code base to this Pull Request by using git-extras:

# In tidb repo:
git pr https://github.com/pingcap/tidb/pull/24635

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/tidb.git pr/24635:release-5.0-aecff1c42e3a

What problem does this PR solve?

Issue Number: close #24356

Problem Summary:

There're duplicate ranges for multi-column index when the last column is not prefix column but the columns before it is prefix column.

What is changed and how it works?

What's Changed:

Whether reset the exclude status of the interval point is decided by the last column's range.
But whether to merge the ranges should be decided once the cut happens since we could not merge the ranges for the prefix column on the IN function. See the added tests.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Release note

  • Fix the case that there could be duplicate ranges for multi-column index.

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot requested a review from a team as a code owner May 13, 2021 12:10
@ti-srebot ti-srebot requested review from winoros and removed request for a team May 13, 2021 12:10
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot added sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/5.0-cherry-pick type/bugfix This PR fixes a bug. labels May 13, 2021
@ti-srebot ti-srebot added this to the v5.0.1 milestone May 13, 2021
@ti-srebot
Copy link
Contributor Author

@winoros you're already a collaborator in bot's repo.

Copy link
Member

@time-and-fate time-and-fate 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-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 24, 2021
@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label May 31, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • qw4990
  • time-and-fate

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.

Details

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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 21, 2021
@qw4990
Copy link
Contributor

qw4990 commented Jun 21, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: c95608d

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 21, 2021
@ti-chi-bot ti-chi-bot merged commit 7ef7ae2 into pingcap:release-5.0 Jun 21, 2021
@eurekaka eurekaka deleted the release-5.0-aecff1c42e3a branch June 21, 2021 07:59
@zhouqiang-cl zhouqiang-cl modified the milestones: v5.0.1, v5.0.3 Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-approved Cherry pick PR approved by release team. sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/5.0-cherry-pick

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants