首页 > 其他分享 >tidb 驱逐节点leader

tidb 驱逐节点leader

时间:2022-08-23 09:56:21浏览次数:90  
标签:27 schedule region leader limit scheduler tidb 节点

1.检查schedul-limit参数

show config where type='pd' and name like '%schedule-limit';
schedule.hot-region-schedule-limit 4
schedule.leader-schedule-limit 4
schedule.merge-schedule-limit 8
schedule.region-schedule-limit 2048
schedule.replica-schedule-limit 64

2.检查store leader数目


select store_id,leader_count,leader_weight,region_count,region_weight from INFORMATION_SCHEMA.TIKV_STORE_STATUS;

1 7 1 27 1
4 9 1 27 1
5 11 1 27 1


3.驱逐节点id=5的leader


#登录pd
tiup ctl:v6.1.0 pd -i
#增加驱逐
scheduler add evict-leader-scheduler 5

4.检查store leader数目

select store_id,leader_count,leader_weight,region_count,region_weight from INFORMATION_SCHEMA.TIKV_STORE_STATUS;
1 12 1 27 1
4 15 1 27 1
5 0 1 27 1

 

5.去除scheduler

 

实验完成去除scheduler

scheduler remove evict-leader-scheduler

标签:27,schedule,region,leader,limit,scheduler,tidb,节点
From: https://www.cnblogs.com/52shaidan/p/16615112.html

相关文章