tikv / tikv/pd

Standardize the use of etcd

Open
#4,349 1 comment 0 reactions 0 assignees View on GitHub
component/storage type/enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.