Closed csuzhangxc closed 2 months ago
/run-all-tests
Attention: Patch coverage is 0%
with 12 lines
in your changes are missing coverage. Please review.
Project coverage is 24.37%. Comparing base (
72bccb5
) to head (432a9a2
). Report is 2 commits behind head on master.
/run-pull-e2e-kind-across-kubernetes
@ideascf: adding LGTM is restricted to approvers and reviewers in OWNERS files.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: ideascf Once this PR has been reviewed and has the lgtm label, please ask for approval from csuzhangxc, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
/run-pull-e2e-kind-across-kubernetes
/cherry-pick release-1.5
@csuzhangxc: new pull request created to branch release-1.5
: #5616.
What problem does this PR solve?
close #5614
In some cases when upgrading TiKV, the evict-leader-scheduler may not be added or missing in PD, but the
evictLeaderBeginTime
annotation of the TiKV pod is added. As TiDB Operator will not call PD API to add evict-leader-scheduler again, then the upgrade operation is blocked.In this PR, we check whether the evict-leader-scheduler exists if a timeout (10m) is reached, and try to add evict-leader-again if it's missing.
What is changed and how does it work?
Code changes
Tests
controller.GetPDClient(u.deps.PDControl, tc).BeginEvictLeader(storeID)
call inbeginEvictLeader
wait for evictition to complete
), and check theevictLeaderBeginTime
annotation existingevictLeaderBeginTime
is updated to the new timeSide effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.