Standardize the use of etcd
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Background
PD owns an embedded etcd to store all kinds of things, such as:
* Cluster meta info
* Region/Store info
* TSO info
* Placement Rules info
* ...
More than these, some other components will also write things into etcd, such as:
* TiDB DDL
* TiKV GCSafePoint
* CDC task info
* TiUP/TiDB-Operator
For now, the use of etcd within PD and by these components is highly casual, which caused some problems.
* https://github.com/tikv/pd/issues/4284
* https://github.com/tikv/pd/issues/4109
* https://github.com/pingcap/ticdc/issues/3112
So we need to standardize the use of etcd.
## Development Task
To achieve this, we need to remedy these behaviors from two perspectives.
### Internal
- [x] Standardize the use of PD Internal storage, including etcd.
- [x] https://github.com/tikv/pd/issues/3453
- [x] Provide a unified key path management to ensure we don't mess up with the etcd key space.
- [x] https://github.com/tikv/pd/issues/4284
- [x] https://github.com/tikv/pd/issues/4109
### External
- [x] [Provide a unified external interface to read and write etcd.](https://github.com/tikv/pd/pull/6025)
- [ ] Refine etcd-related usage statistics and trace information.
Contributor guide
Assessment
This issue has not been assessed yet.