Skip to content

region_scatterer: fix the bug that could generate schedule with too many peers (#5920)#5923

Merged
ti-chi-bot merged 1 commit intotikv:release-6.5from
ti-chi-bot:cherry-pick-5920-to-release-6.5
Feb 13, 2023
Merged

region_scatterer: fix the bug that could generate schedule with too many peers (#5920)#5923
ti-chi-bot merged 1 commit intotikv:release-6.5from
ti-chi-bot:cherry-pick-5920-to-release-6.5

Conversation

@ti-chi-bot
Copy link
Copy Markdown
Member

This is an automated cherry-pick of #5920

What problem does this PR solve?

Issue Number: Close #5909

What is changed and how does it work?

Introduced in #4570 , used stores were not excluded resulting in possible selection of too many targeterPeers.

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release note

Fix the bug that the region scatterer may generate the schedule with too many peers.

…any peers

Signed-off-by: HunDunDM <hundundm@gmail.com>
@ti-chi-bot
Copy link
Copy Markdown
Member Author

ti-chi-bot commented Feb 7, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • rleungx

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 do-not-merge/cherry-pick-not-approved release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 7, 2023
@ti-chi-bot ti-chi-bot added component/schedule Scheduling logic. release-note Denotes a PR that will be considered when it comes time to generate release notes. type/bugfix This PR fixes a bug. type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR. labels Feb 7, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 7, 2023

Codecov Report

Base: 75.54% // Head: 75.61% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (40b8cee) compared to base (d1c0d84).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-6.5    #5923      +/-   ##
===============================================
+ Coverage        75.54%   75.61%   +0.07%     
===============================================
  Files              330      330              
  Lines            32951    32952       +1     
===============================================
+ Hits             24894    24918      +24     
+ Misses            5907     5887      -20     
+ Partials          2150     2147       -3     
Flag Coverage Δ
unittests 75.61% <100.00%> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
server/schedule/operator/step.go 73.09% <100.00%> (ø)
server/schedule/region_scatterer.go 79.13% <100.00%> (+1.26%) ⬆️
server/tso/tso.go 66.85% <0.00%> (-7.87%) ⬇️
server/id/id.go 83.05% <0.00%> (-6.78%) ⬇️
server/tso/local_allocator.go 64.86% <0.00%> (-6.76%) ⬇️
server/schedulers/random_merge.go 62.50% <0.00%> (-3.13%) ⬇️
server/schedule/checker/rule_checker.go 81.31% <0.00%> (-0.74%) ⬇️
server/schedule/operator/builder.go 85.62% <0.00%> (-0.33%) ⬇️
server/server.go 74.53% <0.00%> (ø)
server/grpc_service.go 49.79% <0.00%> (ø)
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@VelocityLight VelocityLight added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Feb 13, 2023
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 13, 2023
Copy link
Copy Markdown

@joccau joccau 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
Copy link
Copy Markdown
Member Author

@joccau: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

Details

In response to this:

LGTM

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
Copy Markdown
Member Author

@3pointer: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

Details

In response to this:

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 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 Feb 13, 2023
@rleungx
Copy link
Copy Markdown
Member

rleungx commented Feb 13, 2023

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member Author

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

/run-all-tests

Details

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
Copy Markdown
Member Author

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

DetailsCommit hash: 40b8cee

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 13, 2023
@ti-chi-bot ti-chi-bot merged commit b04f0a9 into tikv:release-6.5 Feb 13, 2023
@VelocityLight VelocityLight removed the cherry-pick-approved Cherry pick PR approved by release team. label Mar 13, 2023
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. component/schedule Scheduling logic. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants