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

opt: do not evict leader when changing PVC size #5101

Merged
merged 7 commits into from
Jun 30, 2023

Conversation

csuzhangxc
Copy link
Member

@csuzhangxc csuzhangxc commented Jun 28, 2023

What problem does this PR solve?

Do not evict leader when changing (increasing) PVC size, as if the storage size is not enough, the leader eviction will be blocked (never finished)

NOTE: if changing size and rolling restart TiKV at the same time, leader eviction is still triggered.

What is changed and how does it work?

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
    • only change storage size, no evict leader happen
    • only change IOPS/throughput, evict leader takes effect
    • change both IOPS/throughput&storage size, no evict leader happen
  • No code

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.

Skip evicting leader for TiKV when changing PVC size

@ti-chi-bot ti-chi-bot bot requested a review from lichunzhu June 28, 2023 03:08
@ti-chi-bot ti-chi-bot bot added the size/M label Jun 28, 2023
@csuzhangxc csuzhangxc changed the title opt: do not evict leader when change PVC size opt: do not evict leader when changing PVC size Jun 28, 2023
@csuzhangxc
Copy link
Member Author

/test pull-e2e-kind

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 28, 2023

@csuzhangxc: The label(s) /pull-e2e-kind cannot be applied, because the repository doesn't have them.

In response to this:

/test pull-e2e-kind

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
Contributor

ti-chi-bot bot commented Jun 28, 2023

@csuzhangxc: No presubmit jobs available for pingcap/tidb-operator@master

In response to this:

/test pull-e2e-kind

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 kubernetes/test-infra repository.

@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2023

Codecov Report

Merging #5101 (e0bb0ac) into master (a150c2f) will increase coverage by 4.87%.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5101      +/-   ##
==========================================
+ Coverage   57.81%   62.68%   +4.87%     
==========================================
  Files         248      252       +4     
  Lines       28868    32266    +3398     
==========================================
+ Hits        16690    20227    +3537     
+ Misses      10551    10405     -146     
- Partials     1627     1634       +7     
Flag Coverage Δ
e2e 41.61% <0.00%> (?)
unittest 57.77% <0.00%> (-0.04%) ⬇️

@csuzhangxc
Copy link
Member Author

/test pull-e2e-kind

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 29, 2023

@csuzhangxc: The label(s) /pull-e2e-kind cannot be applied, because the repository doesn't have them.

In response to this:

/test pull-e2e-kind

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
Contributor

ti-chi-bot bot commented Jun 29, 2023

@csuzhangxc: No presubmit jobs available for pingcap/tidb-operator@master

In response to this:

/test pull-e2e-kind

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 kubernetes/test-infra repository.

Copy link
Contributor

@hanlins hanlins left a comment

Choose a reason for hiding this comment

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

Basically if any volume in modifying phase or need to expand is detected, skip leader eviction. LGTM

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 29, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hanlins

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 29, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 29, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-06-29 20:31:32.968961737 +0000 UTC m=+31176.343539617: ☑️ agreed by hanlins.

@ti-chi-bot ti-chi-bot bot added the approved label Jun 29, 2023
@hanlins
Copy link
Contributor

hanlins commented Jun 29, 2023

/test pull-e2e-kind-across-kubernetes
/test pull-e2e-kind-basic
/test pull-e2e-kind-br
/test pull-e2e-kind-serial

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 29, 2023

@hanlins: The label(s) /pull-e2e-kind-across-kubernetes, /pull-e2e-kind-basic, /pull-e2e-kind-br, /pull-e2e-kind-serial cannot be applied, because the repository doesn't have them.

In response to this:

/test pull-e2e-kind-across-kubernetes
/test pull-e2e-kind-basic
/test pull-e2e-kind-br
/test pull-e2e-kind-serial

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
Contributor

ti-chi-bot bot commented Jun 29, 2023

@hanlins: No presubmit jobs available for pingcap/tidb-operator@master

In response to this:

/test pull-e2e-kind-across-kubernetes
/test pull-e2e-kind-basic
/test pull-e2e-kind-br
/test pull-e2e-kind-serial

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 kubernetes/test-infra repository.

@hanlins
Copy link
Contributor

hanlins commented Jun 30, 2023

/test pull-e2e-kind-br
/test pull-e2e-kind-serial

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 30, 2023

@hanlins: The label(s) /pull-e2e-kind-br, /pull-e2e-kind-serial cannot be applied, because the repository doesn't have them.

In response to this:

/test pull-e2e-kind-br
/test pull-e2e-kind-serial

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
Contributor

ti-chi-bot bot commented Jun 30, 2023

@hanlins: No presubmit jobs available for pingcap/tidb-operator@master

In response to this:

/test pull-e2e-kind-br
/test pull-e2e-kind-serial

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 kubernetes/test-infra repository.

@csuzhangxc csuzhangxc merged commit c0ad8d6 into pingcap:master Jun 30, 2023
@csuzhangxc
Copy link
Member Author

/cherry-pick release-1.5

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 30, 2023

@csuzhangxc: The label(s) /release-1.5 cannot be applied, because the repository doesn't have them.

In response to this:

/cherry-pick release-1.5

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

@csuzhangxc: new pull request created to branch release-1.5: #5107.

In response to this:

/cherry-pick release-1.5

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants