Initialize the customized value in store limit V1 by config
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Feature Request
### Describe your feature request related problem
[Store limit](https://docs.pingcap.com/tidb/stable/configure-store-limit) is an important property for TiDB clusters. Currently [store limit](https://docs.pingcap.com/tidb/stable/configure-store-limit) is managed by `pd-ctl` after PD starts. We cannot save and manage this value during initialization of PD. Cluster management tools like TEM is not able to manage this behavior along with other configurations.
### Describe the feature you'd like
Introduce a config to PD for setting an initial value of `store limit`. Something like this:
```
store-limit=' add-peer|remove-peer[, add-peer|remove-peer]'
```
Decode this string and initialize the value one by one. For example
```
store-limit='all 5 add-peer, 1 5 add-peer, 1 5 remove-peer'
```
It can be interpreted as following items that are called by `pd-ctl`
```
store limit all 5 add-peer
store limit 1 5 add-peer
store limit 1 5 remove-peer
```
If possible, making it a [dynamic config](https://docs.pingcap.com/tidb/stable/dynamic-config) which can be set by `set config` is a bonus.
### Describe alternatives you've considered
Not yet.
### Teachability, Documentation, Adoption, Migration Strategy
For customers which have a large amount of customers, they tend to use cluster management tools like TEM to manage verified configurations for existing clusters. With this config, store limit is out of such control.
Contributor guide
Assessment
This issue has not been assessed yet.