Allow clients watch region meta changes
- 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
Clients (like TiDB) usually cache region meta in memory and the cache is only updated after clients encounter an error or the region meta is not used for a long time.
If there are many region meta changes in a short period of time, clients may take a long time to retry and reload regions from PD.
### Describe the feature you'd like
PD can provide API for clients to watch region meta changes. Then PD can send updated region meta to client.
### Describe alternatives you've considered
If PD finds there are too many changes, it can notify clients to let them drop their cache and reload later.
### Teachability, Documentation, Adoption, Migration Strategy
Contributor guide
Assessment
This issue has not been assessed yet.