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

cluster: upgrade PD leader after other PD instances #1086

Merged
merged 2 commits into from
Jan 22, 2021

Conversation

AstroProfundis
Copy link
Contributor

What problem does this PR solve?

Close #664

What is changed and how it works?

Check if instance is PD leader and defer the upgrading process for it.

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • Has exported function/method change

Side effects

  • Increased code complexity

Release notes:

cluster: upgrade PD leader node after upgrading other PD nodes

@AstroProfundis AstroProfundis added type/new-feature Categorizes pr as related to a new feature. type/enhancement Categorizes issue or PR as related to an enhancement. category/stability Categorizes issue or PR as a stability enhancement. labels Jan 21, 2021
@AstroProfundis AstroProfundis self-assigned this Jan 21, 2021
@ti-chi-bot ti-chi-bot requested a review from july2993 January 21, 2021 08:38
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 21, 2021
@AstroProfundis AstroProfundis removed the request for review from july2993 January 21, 2021 08:39
@codecov-io
Copy link

codecov-io commented Jan 21, 2021

Codecov Report

Merging #1086 (2ade913) into master (d4881ba) will decrease coverage by 4.53%.
The diff coverage is 65.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1086      +/-   ##
==========================================
- Coverage   56.41%   51.87%   -4.54%     
==========================================
  Files         278      278              
  Lines       19696    19723      +27     
==========================================
- Hits        11111    10232     -879     
- Misses       6862     7870    +1008     
+ Partials     1723     1621     -102     
Flag Coverage Δ
cluster 38.46% <65.90%> (-6.17%) ⬇️
dm 24.34% <22.72%> (-0.02%) ⬇️
integrate 46.15% <65.90%> (-4.61%) ⬇️
playground 20.91% <ø> (ø)
tiup 16.67% <0.00%> (-0.02%) ⬇️
unittest 22.40% <0.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
pkg/cluster/spec/pd.go 68.07% <61.53%> (-0.72%) ⬇️
pkg/cluster/operation/upgrade.go 68.88% <67.74%> (-1.49%) ⬇️
components/cluster/command/check.go 6.60% <0.00%> (-72.96%) ⬇️
pkg/cluster/task/limits.go 0.00% <0.00%> (-68.75%) ⬇️
pkg/cluster/task/sysctl.go 0.00% <0.00%> (-66.67%) ⬇️
pkg/cluster/task/copy_file.go 0.00% <0.00%> (-54.55%) ⬇️
components/cluster/command/audit.go 27.27% <0.00%> (-54.55%) ⬇️
pkg/cluster/operation/check.go 0.00% <0.00%> (-53.07%) ⬇️
pkg/cluster/manager/patch.go 0.00% <0.00%> (-51.81%) ⬇️
pkg/cluster/task/rmdir.go 0.00% <0.00%> (-50.00%) ⬇️
... and 41 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 d4881ba...2ade913. Read the comment docs.

@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 22, 2021
@lucklove
Copy link
Member

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lucklove

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 22, 2021
@lucklove
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 1574ec7

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 22, 2021
@ti-chi-bot ti-chi-bot merged commit d85cb88 into pingcap:master Jan 22, 2021
@AstroProfundis AstroProfundis deleted the upgrade-pd branch January 22, 2021 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/stability Categorizes issue or PR as a stability enhancement. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/enhancement Categorizes issue or PR as related to an enhancement. type/new-feature Categorizes pr as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade pd that is not leader first then upgrade pd leader in tiup upgrade
4 participants