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

checker: fix the issue that a region does not merge to the sibling with smaller size (#1723) #1726

merged 1 commit into from Sep 4, 2019


Copy link

commented Sep 3, 2019

cherry-pick #1723 to release-3.0

Signed-off-by: disksing

What problem does this PR solve?

The target argument passed to checkTarget is always nil, so next and prev are never compared.

What is changed and how it works?

Make it right and clear and add test.

Check List


  • Unit test

Related changes

  • Need to cherry-pick to the release branch
checker: fix merge bug
Signed-off-by: disksing <>
rleungx approved these changes Sep 3, 2019
targetNext := m.checkTarget(region, next, target)
target = m.checkTarget(region, prev, target)
if target != targetNext && m.cluster.GetEnableOneWayMerge() {
checkerCounter.WithLabelValues("merge_checker", "skip_left").Inc()

This comment has been minimized.

Copy link

rleungx Sep 3, 2019


BTW, do we need to keep the metrics?

This comment has been minimized.

Copy link

disksing Sep 3, 2019


em, seems not very useful

nolouch approved these changes Sep 4, 2019

@nolouch nolouch added the CanMerge label Sep 4, 2019


This comment has been minimized.

Copy link

commented Sep 4, 2019


@sre-bot sre-bot merged commit b365c1d into pingcap:release-3.0 Sep 4, 2019

8 checks passed

ci/circleci Your tests passed on CircleCI!
continuous-integration/travis-ci/pr The Travis CI build passed
idc-jenkins-ci-pd/integration-common-test Jenkins job succeeded.
idc-jenkins-ci-pd/integration-compatibility-test Jenkins job succeeded.
idc-jenkins-ci-pd/integration-ddl-test Jenkins job succeeded.
idc-jenkins-ci/build Jenkins job succeeded.
idc-jenkins-ci/test Jenkins job succeeded.
license/cla Contributor License Agreement is signed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.