-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Enhancement
After years of iteration, the GC related code, which originally lacked of proper design, has become a huge historical debt that makes our futher mantainance, development and optimization difficult. Some badly-designed interfaces cause misuses frequently, and these misuses can be dangerous to affect the data correctness. Now, we've planned a refactor to redesign most of these related PD APIs, redefine some terms, and avoid those code that's obscure and easy to misuse. After the refactoring which is expected to make the GC related APIs and concetps more clear and comprehensible, we will then implement a feature named protected snapshots over it, which is expected to help PiTR to reduce their cost to maintain ther backup progress.
Subtasks
- PD API refactorying: Refactor GC related PD APIs tikv/pd#8978
- TiKV: Adapt to the new PD API
- Next gen
- master
- Adapt TiDB's GCWorker to the new PD API gc_worker: Adapt to new GC API and support keyspace level GC #60632
- Mock PD of unistore: unistore: Implement the new PD API for GC #61529
- Required adaption in client-go: Replace etcd safe point with txn safe point for read safety check tikv/client-go#1634
- TiKV: Add checks to prevent reading/writing to unsafe snapshots
Fixes
(...to be more detailed)
Next step
After finishing the refactoring, we will then implement protected snapshots upon it. We will then track that task in another issue.