scheduler: graceful shutdown implement#9720
Conversation
|
Hi @hujiatao0. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
Welcome @hujiatao0! |
|
/ok-to-test |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #9720 +/- ##
==========================================
+ Coverage 76.75% 76.87% +0.12%
==========================================
Files 488 489 +1
Lines 77727 78019 +292
==========================================
+ Hits 59658 59979 +321
+ Misses 14414 14394 -20
+ Partials 3655 3646 -9
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
4faf212 to
3abfe2c
Compare
ac129a7 to
80045a7
Compare
|
please fix the conflict @hujiatao0 |
new slow store format scheduler for graceful shutdown Signed-off-by: hujiatao0 <hhjjtt110@gmail.com> add unit test and remove some useless code Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
14fab10 to
f752039
Compare
Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
|
/retest |
| func (s *evictStoppingStoreScheduler) cleanupEvictLeader(cluster sche.SchedulerCluster) { | ||
| evictStoppingStore, err := s.conf.clearEvictedAndPersist() | ||
| if err != nil { | ||
| log.Info("evict-stopping-store-scheduler persist config failed", zap.Uint64("store-id", evictStoppingStore)) |
There was a problem hiding this comment.
It is better to keep the consistency between storage and memory.
| log.Info("evict-stopping-store-scheduler persist config failed", zap.Uint64("store-id", evictStoppingStore)) | |
| log.Warn("evict-stopping-store-scheduler persist config failed", zap.Uint64("store-id", evictStoppingStore)) | |
| return |
Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
3a6c4dd to
5f818ac
Compare
|
/retest |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: niubell, okJiang, rleungx The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
@hujiatao0: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
close tikv#9719 Add an is_stopping status to the StoreHeartbeat message. When TiKV receives a SIGTERM, it sets this flag. This change adds a new evict-stopping-store-scheduler to PD, which is analogous to the evict-slow-store-scheduler. It proactively transfers leaders away from nodes by inspecting the is_stopping status from store heartbeats. Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
close #9719 Add an is_stopping status to the StoreHeartbeat message. When TiKV receives a SIGTERM, it sets this flag. This change adds a new evict-stopping-store-scheduler to PD, which is analogous to the evict-slow-store-scheduler. It proactively transfers leaders away from nodes by inspecting the is_stopping status from store heartbeats. Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
close tikv#9719 Add an is_stopping status to the StoreHeartbeat message. When TiKV receives a SIGTERM, it sets this flag. This change adds a new evict-stopping-store-scheduler to PD, which is analogous to the evict-slow-store-scheduler. It proactively transfers leaders away from nodes by inspecting the is_stopping status from store heartbeats. Signed-off-by: hujiatao0 <hhjjtt110@gmail.com>
close tikv#9719 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
In response to a cherrypick label: new pull request created to branch |
add test for scheduler
What problem does this PR solve?
Issue Number: Close #9719
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
pingcap/kvproto: Add graceful shutdown flag to store heartbeat pingcap/kvproto#1345pingcap/tikv:server: graceful shutdown tikv-impl tikv#18930Release note