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

Add leader safeguard filter for balance-leader-scheduler (#2617) #2636

Merged
merged 5 commits into from
Jul 14, 2020

Conversation

Yisaer
Copy link
Contributor

@Yisaer Yisaer commented Jul 14, 2020

What problem does this PR solve?

close #2607

What is changed and how it works?

Add filter to check whether the target store break the placement rules in balance-leader-schelder in transferLeaderOut case and transferLeaderIn case.

Check List

Tests

  • Unit test

Release note

  • Fix the bug that balance-leader-scheduler won't consider placement rule when it enabled.

@Yisaer Yisaer requested review from rleungx and disksing and removed request for rleungx July 14, 2020 06:08
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 14, 2020
@lhy1024 lhy1024 added the require-LGT1 Indicates that the PR requires an LGTM. label Jul 14, 2020
@lhy1024 lhy1024 added this to the v4.0.3 milestone Jul 14, 2020
@lhy1024 lhy1024 changed the title Add leader safeguard filter for balance-leader-scheduler #2617 Add leader safeguard filter for balance-leader-scheduler (#2617) Jul 14, 2020
@lhy1024 lhy1024 added type/bugfix This PR fixes a bug. type/cherry-pick labels Jul 14, 2020
@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 2635

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 14, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@codecov-commenter
Copy link

Codecov Report

Merging #2636 into release-4.0 will increase coverage by 0.02%.
The diff coverage is 84.21%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-4.0    #2636      +/-   ##
===============================================
+ Coverage        77.11%   77.13%   +0.02%     
===============================================
  Files              205      205              
  Lines            22115    22151      +36     
===============================================
+ Hits             17053    17087      +34     
+ Misses            3761     3760       -1     
- Partials          1301     1304       +3     
Impacted Files Coverage Δ
server/schedule/filter/filters.go 83.87% <73.91%> (-0.90%) ⬇️
server/schedulers/balance_leader.go 92.12% <100.00%> (+0.67%) ⬆️
server/schedulers/random_merge.go 61.19% <0.00%> (-2.99%) ⬇️
pkg/mock/mockhbstream/mockhbstream.go 89.23% <0.00%> (-1.54%) ⬇️
server/tso/tso.go 80.00% <0.00%> (-1.49%) ⬇️
pkg/etcdutil/etcdutil.go 82.60% <0.00%> (-1.45%) ⬇️
server/server.go 75.86% <0.00%> (-0.76%) ⬇️
client/base_client.go 90.60% <0.00%> (-0.68%) ⬇️
server/grpc_service.go 58.68% <0.00%> (-0.58%) ⬇️
client/client.go 71.60% <0.00%> (-0.51%) ⬇️
... and 5 more

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 52d88ad...f63526c. Read the comment docs.

Copy link
Member

@HunDunDM HunDunDM 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 removed the status/LGT1 Indicates that a PR has LGTM 1. label Jul 14, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jul 14, 2020
@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 2640
  • 2635

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@Yisaer merge failed.

@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 2637
  • 2638

@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 2638
  • 2638

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@Yisaer merge failed.

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@Yisaer merge failed.

@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 77098f8 into tikv:release-4.0 Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
require-LGT1 Indicates that the PR requires an LGTM. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants