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

*: improve the topology weight calculation #5300

Merged
merged 6 commits into from Jul 21, 2022

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jul 13, 2022

What problem does this PR solve?

Issue Number: Close #5234.

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

Fix the issue that the online process is not accurate when having invalid label settings.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 13, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AndreMouche
  • CabinfeverB

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 submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note The PR should write the release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 13, 2022
@rleungx rleungx changed the title --wip-- [skip ci] *: improve the topology weight calculation Jul 13, 2022
@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@eba7b6a). Click here to learn what that means.
The diff coverage is 80.00%.

@@            Coverage Diff            @@
##             master    #5300   +/-   ##
=========================================
  Coverage          ?   75.78%           
=========================================
  Files             ?      312           
  Lines             ?    30999           
  Branches          ?        0           
=========================================
  Hits              ?    23494           
  Misses            ?     5511           
  Partials          ?     1994           
Flag Coverage Δ
unittests 75.78% <80.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/cluster/cluster.go 83.61% <80.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eba7b6a...60f4d67. Read the comment docs.

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx force-pushed the improve-weight-calculation branch from 7fb4f5a to 664b6f5 Compare July 19, 2022 07:58
@rleungx rleungx marked this pull request as ready for review July 19, 2022 08:00
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 19, 2022
break
}
if count/c == 1 {
validLabels = []string{validLabels[i]}
Copy link
Member

Choose a reason for hiding this comment

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

a store with label(dc1,zone1) and a store with label(dc2 zone1) are different. So I think it should be

validLabels = validLabels[:i+1]

Otherwise, it will affect the results of CompareLocation.

Copy link
Member

@AndreMouche AndreMouche 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 Jul 19, 2022
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@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 Jul 19, 2022
@lhy1024
Copy link
Contributor

lhy1024 commented Jul 20, 2022

/merge

@ti-chi-bot
Copy link
Member

@lhy1024: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

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

Commit hash: 110063f

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 20, 2022
@ti-chi-bot ti-chi-bot merged commit fa0a206 into tikv:master Jul 21, 2022
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jul 21, 2022
close tikv#5234

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #5344.

@rleungx rleungx deleted the improve-weight-calculation branch July 21, 2022 11:28
ti-chi-bot added a commit that referenced this pull request Aug 1, 2022
close #5234, ref #5300

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.1 release-note The PR should write the release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Online progress hung in 83% when scale out with imbalance labels
6 participants