关于tikv下线不彻底问题的处理咨询

  • 【TiDB 版本】:v3.0.3
  • 【问题描述】: 执行pd-ctl store delete指令下线一个tikv实例后,leader count逐步降为0,但region count降到还有8000多的时候一直停住了不再降了,请问是什么原因导致?怎么处理让其继续降低直到完全下线?

麻烦检查下以下信息:

  1. 当前 TiKV 除了 下线的 store 的其他 store 的空间是否充足(可以看看 PD 的监控里面的 Statistics - balance 里面的监控信息)
  2. 麻烦确认下 PD 的配置:{tidb_ansible_path}/resource/bin/pd-ctl config show -u http://{pd_ip}:{pd_port}

其他store的剩余空间还有30多GB,配置的总容量是400GB,pd-ctl config show返回信息如下: { “replication”: { “location-labels”: “host”, “max-replicas”: 3, “strictly-match-label”: “false” }, “schedule”: { “disable-location-replacement”: “false”, “disable-make-up-replica”: “false”, “disable-namespace-relocation”: “false”, “disable-raft-learner”: “false”, “disable-remove-down-replica”: “false”, “disable-remove-extra-replica”: “false”, “disable-replace-offline-replica”: “false”, “enable-one-way-merge”: “false”, “high-space-ratio”: 0.6, “hot-region-cache-hits-threshold”: 3, “hot-region-schedule-limit”: 4, “leader-schedule-limit”: 4, “low-space-ratio”: 0.8, “max-merge-region-keys”: 0, “max-merge-region-size”: 0, “max-pending-peer-count”: 16, “max-snapshot-count”: 3, “max-store-down-time”: “1h0m0s”, “merge-schedule-limit”: 8, “patrol-region-interval”: “100ms”, “region-schedule-limit”: 4, “replica-schedule-limit”: 8, “scheduler-max-waiting-operator”: 3, “schedulers-v2”: [ { “args”: null, “disable”: false, “type”: “balance-region” }, { “args”: null, “disable”: false, “type”: “balance-leader” }, { “args”: null, “disable”: false, “type”: “hot-region” }, { “args”: null, “disable”: false, “type”: “label” }, { “args”: [ “16165519” ], “disable”: false, “type”: “evict-leader” }, { “args”: [ “16165518” ], “disable”: false, “type”: “evict-leader” } ], “split-merge-interval”: “1h0m0s”, “store-balance-rate”: 15, “tolerant-size-ratio”: 2.5 } }

看到配置里面的 low-space-ratio 为0.8 。那么当 TiKV 的剩余空间少于 20% 的时候就不会往那些 store 进行副本的调度。现在集群内的 store 的空间并不充裕。
现在是由于需要维护所以把原来的 store 下了吗?

是的呢,那看怎么调整可以继续迁移完成呢? 把这个值改成接近0就可以了吗?

不建议调整得太少了。空间不足会引起 TiKV 无法正常运行的。能否先扩容一个节点呢?

扩容不了了,我们是500g ssd,配置的容量400GB,本身有预留,这样也无法正常运行吗?

请问一下之前做容量限制的时候是调整了哪些参数呢?