Add a checkpoint check for restore to validate if the checkpoint applicable.
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
We need a validation to ensure checkpoints are only applied when the new restore’s scope fully overlaps with the original checkpoint’s scope
Currently, TiDB's restore mechanism automatically resumes from a checkpoint if a checkpoint meta file exists in external storage. However, there's no validation to ensure the subsequent restore operation is compatible with the checkpoint's original scope. This can lead to improper application of checkpoints when `--filter` are altered between attempts.
If a user:
Starts a restore with a filter range (e.g., db1.t1–db1.t5), then interrupts it.
Later attempts a new restore with a non-overlapping filter range (e.g., db1.t100–db1.t500),
The existing checkpoint (from the first restore) is still applied, despite the restore scope being entirely different. This violates the expectation of atomicity and correctness.
Contributor guide
Assessment
This issue has not been assessed yet.