Unified timer framework in TiDB
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
There are many requirements for scheduling some jobs periodically in TiDB. For example, TTL needs to schedule a job to delete expired rows every several hours. The implementations look similar in these features, that is: schedule a background "watcher" task in the cluster to check the timer's condition. Once the timer is up to time, then schedule a new job to do something. The "watcher" task will also persist the timer's progress (such as the last job's execution time) to avoid a duplicated job's schedule.
It's better to provide a unified interface to all features with the above requirement.
### Subtasks
- [x] #43836
- [x] #43938
- [x] #44175
- [x] #44445
- [x] #44603
- [x] #44720
- [x] #45009
- [x] #45128
- [x] #45527
- [x] #45610
- [x] #46330
- [x] #46411
- [x] #46857
- [ ] #46856
Contributor guide
Assessment
This issue has not been assessed yet.