Skip to content

Fix split on empty segment#1815

Merged
JaySon-Huang merged 3 commits intopingcap:masterfrom
flowbehappy:fix_split_with_zero_rows.master
Apr 25, 2021
Merged

Fix split on empty segment#1815
JaySon-Huang merged 3 commits intopingcap:masterfrom
flowbehappy:fix_split_with_zero_rows.master

Conversation

@flowbehappy
Copy link
Contributor

@flowbehappy flowbehappy commented Apr 23, 2021

What problem does this PR solve?

Issue Number: close #1812

Problem Summary:

getSplitPointSlow does not properly handle the case that the segment has no rows.

What is changed and how it works?

What's Changed:

If the segment is empty, refuse to split.

Related changes

Check List

Tests

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

Side effects

Release note

  • Fix a bug that TiFlash crash during Segment Split.

@flowbehappy flowbehappy added the type/bugfix This PR fixes a bug. label Apr 23, 2021
@flowbehappy flowbehappy self-assigned this Apr 23, 2021
@flowbehappy flowbehappy added the needs-cherry-pick-release-5.0 PR which needs to be cherry-picked to release-5.0 label Apr 23, 2021
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

LGTM with minor comment

@JaySon-Huang JaySon-Huang added needs-cherry-pick-release-4.0 PR which needs to be cherry-picked to release-4.0 and removed needs-cherry-pick-release-4.0 PR which needs to be cherry-picked to release-4.0 labels Apr 23, 2021
@flowbehappy flowbehappy added this to the v5.0.2 milestone Apr 25, 2021
@flowbehappy
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@JaySon-Huang JaySon-Huang 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 the status/LGT1 Indicates that a PR has LGTM 1. label Apr 25, 2021
@JaySon-Huang JaySon-Huang merged commit 94d9e9f into pingcap:master Apr 25, 2021
@JaySon-Huang JaySon-Huang deleted the fix_split_with_zero_rows.master branch April 25, 2021 09:30
@ti-srebot
Copy link
Collaborator

cherry pick to release-5.0 in PR #1823

@JaySon-Huang JaySon-Huang removed this from the v5.0.2 milestone May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-cherry-pick-release-5.0 PR which needs to be cherry-picked to release-5.0 status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getSplitPointSlow unexpected split_handle

3 participants