-
Notifications
You must be signed in to change notification settings - Fork 499
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
wait leaders transfer back after a tikv upgrade #4863
wait leaders transfer back after a tikv upgrade #4863
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4863 +/- ##
==========================================
+ Coverage 59.39% 64.94% +5.55%
==========================================
Files 226 230 +4
Lines 25628 28776 +3148
==========================================
+ Hits 15221 18688 +3467
+ Misses 8959 8569 -390
- Partials 1448 1519 +71
|
pkg/manager/member/tikv_upgrader.go
Outdated
leaderCountBefore := int(*store.LeaderCountBeforeUpgrade) | ||
if leaderCountBefore < 200 { | ||
klog.Infof("%s: leader count is %d and less than 200, so skip waiting leaders for transfer back", logPrefix, leaderCountBefore) | ||
return true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved to the head of isLeaderTransferBackOrTimeout
.
The parse of evictLeaderEndTime
is before this check but the usage of evictLeaderEndTime
is after this check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 3ea0114
/test pull-e2e-kind pull-e2e-kind-basic pull-e2e-kind-serial |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 3ea0114
|
/test pull-e2e-kind |
/test pull-e2e-kind-serial |
/test pull-e2e-kind pull-e2e-kind-serial |
/test pull-e2e-kind |
3 similar comments
/test pull-e2e-kind |
/test pull-e2e-kind |
/test pull-e2e-kind |
What problem does this PR solve?
status.tikv.store[].leaderCountBeforeUpgrade
before a tikv eviction begin.tidb.pingcap.com/tikv-evict-leader-end-at
of the pod.The following cases indicate that the transfer is done:
leaderCountBeforeUpgrade
ortidb.pingcap.com/tikv-evict-leader-end-at
.leaderCountBeforeUpgrade
is less than 200.leaderCountBeforeUpgrade
* 2/3What is changed and how does it work?
Code changes
Tests
Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.