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

placement: do not delete orphan peers if some peers selected by RuleFit is down or pending #4067

Merged
merged 5 commits into from
Sep 6, 2021

Conversation

andylokandy
Copy link
Contributor

What problem does this PR solve?

fixes #4045

Related changes

  • Need to cherry-pick to the release-5.0

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 2, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • disksing
  • nolouch

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 the release-note-none Denotes a PR that doesn't merit a release note. label Sep 2, 2021
@andylokandy
Copy link
Contributor Author

/cc @nolouch @disksing

@disksing
Copy link
Contributor

disksing commented Sep 2, 2021

If pending peer is considered not satisfied, the checker will create an operator to replace the pending peer immediately. But I think in most cases, we should wait for the status to become normal rather than replace it.

Signed-off-by: Andy Lok <andylokandy@hotmail.com>
@andylokandy andylokandy changed the title placement: RuleFit should not be satisfied if peer is down or pending placement: do not delete orphan peers if some peers selected by RuleFit is down or pending Sep 2, 2021
@andylokandy
Copy link
Contributor Author

@disksing I've reimplemented the patch, PTAL.

@codecov
Copy link

codecov bot commented Sep 2, 2021

Codecov Report

Merging #4067 (a01cc45) into master (fa09aff) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4067      +/-   ##
==========================================
+ Coverage   74.55%   74.64%   +0.09%     
==========================================
  Files         258      258              
  Lines       26079    26085       +6     
==========================================
+ Hits        19444    19472      +28     
+ Misses       4893     4880      -13     
+ Partials     1742     1733       -9     
Flag Coverage Δ
unittests 74.64% <100.00%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
server/schedule/checker/rule_checker.go 82.35% <100.00%> (+1.68%) ⬆️
server/schedulers/shuffle_hot_region.go 53.53% <0.00%> (-12.13%) ⬇️
server/id/id.go 76.19% <0.00%> (-9.53%) ⬇️
server/tso/allocator_manager.go 67.77% <0.00%> (ø)
client/client.go 71.96% <0.00%> (+0.13%) ⬆️
client/base_client.go 84.89% <0.00%> (+0.52%) ⬆️
server/grpc_service.go 47.27% <0.00%> (+0.56%) ⬆️
server/server.go 72.18% <0.00%> (+0.60%) ⬆️
server/config/persist_options.go 92.30% <0.00%> (+0.76%) ⬆️
pkg/btree/btree.go 86.74% <0.00%> (+0.96%) ⬆️
... 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 fa09aff...a01cc45. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 3, 2021
@disksing
Copy link
Contributor

disksing commented Sep 3, 2021

btw, can we add a test case for it?

Copy link
Contributor

@nolouch nolouch left a comment

Choose a reason for hiding this comment

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

could you add a test?

@nolouch nolouch added needs-cherry-pick-release-5.0 The PR needs to cherry pick to release-5.0 branch. needs-cherry-pick-release-5.1 Type: Need cherry pick to release-5.1 needs-cherry-pick-release-5.2 Type: Need cherry pick to release-5.2 labels Sep 6, 2021
Copy link
Contributor

@nolouch nolouch 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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 6, 2021
@nolouch
Copy link
Contributor

nolouch commented Sep 6, 2021

/merge

@ti-chi-bot
Copy link
Member

@nolouch: 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: a01cc45

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 6, 2021
@ti-chi-bot ti-chi-bot merged commit 53530bf into tikv:master Sep 6, 2021
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Sep 6, 2021
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: #4073.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Sep 6, 2021
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: #4074.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Sep 6, 2021
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: #4075.

ti-chi-bot added a commit that referenced this pull request Sep 6, 2021
…it is down or pending (#4067) (#4073)

* This is an automated cherry-pick of #4067

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

* resolve conflict

Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: Andy Lok <andylokandy@hotmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
andylokandy added a commit to andylokandy/pd that referenced this pull request Sep 6, 2021
…it is down or pending (tikv#4067)

* address comment

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* add test

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

Co-authored-by: ShuNing <nolouch@gmail.com>
ti-chi-bot added a commit that referenced this pull request Sep 13, 2021
…it is down or pending (#4067) (#4074)

* This is an automated cherry-pick of #4067

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

* fix

Signed-off-by: HunDunDM <hundundm@gmail.com>

Co-authored-by: Andy Lok <andylokandy@hotmail.com>
Co-authored-by: HunDunDM <hundundm@gmail.com>
ti-chi-bot added a commit that referenced this pull request Oct 18, 2021
…it is down or pending (#4067) (#4075)

* This is an automated cherry-pick of #4067

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

* reslove commit

Signed-off-by: nolouch <nolouch@gmail.com>

Co-authored-by: Andy Lok <andylokandy@hotmail.com>
Co-authored-by: nolouch <nolouch@gmail.com>
Co-authored-by: 混沌DM <hundundm@gmail.com>
v01dstar pushed a commit to v01dstar/pd that referenced this pull request Oct 28, 2021
…it is down or pending (tikv#4067)

* address comment

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* add test

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

Co-authored-by: ShuNing <nolouch@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-5.0 The PR needs to cherry pick to release-5.0 branch. needs-cherry-pick-release-5.1 Type: Need cherry pick to release-5.1 needs-cherry-pick-release-5.2 Type: Need cherry pick to release-5.2 release-note-none Denotes a PR that doesn't merit a 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.

PD may remove wrong pending peer if the peer count exceeds the limit
4 participants