Closed sachin-japate closed 1 week ago
Welcome @sachin-japate! It looks like this is your first PR to pingcap/tidb-operator 🎉
/cc @WangLe1321 ptal
@BornChanger: GitHub didn't allow me to request PR reviews from the following users: ptal.
Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.
/cc @kennytm
LGTM in principle, but we could do an enhancement. In BR On-Prem we additionally checked that --start-ts
and --full-backup-storage
cannot both exist. I think here we should also ensure exactly one of pitrFullBackupStorageProvider
and logRestoreStartTs
is provided, not both or zero.
LGTM in principle, but we could do an enhancement. In BR On-Prem we additionally checked that
--start-ts
and--full-backup-storage
cannot both exist. I think here we should also ensure exactly one ofpitrFullBackupStorageProvider
andlogRestoreStartTs
is provided, not both or zero.
@kennytm Added validations in the restore spec as you requested.
@kennytm: adding LGTM is restricted to approvers and reviewers in OWNERS files.
@RidRisR: adding LGTM is restricted to approvers and reviewers in OWNERS files.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: kennytm, RidRisR, WangLe1321
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Timeline:
2024-06-26 03:58:27.992275976 +0000 UTC m=+778434.477764809
: :ballot_box_with_check: agreed by WangLe1321./run-pull-e2e-kind-br
Attention: Patch coverage is 33.33333%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 33.30%. Comparing base (
9ef26f8
) to head (5335b3c
).
/run-pull-e2e-kind /run-pull-e2e-kind-across-kubernetes /run-pull-e2e-kind-basic /run-pull-e2e-kind-serial
/run-pull-e2e-kind /run-pull-e2e-kind-across-kubernetes
/run-pull-e2e-kind
/run-pull-e2e-kind-across-kubernetes
/run-pull-e2e-kind-basic
/run-pull-e2e-kind-serial
/cherry-pick release-1.5
/cherry-pick release-1.6
@csuzhangxc: new pull request created to branch release-1.5
: #5668.
@csuzhangxc: new pull request created to branch release-1.6
: #5669.
What problem does this PR solve?
This PR is addressing the issue issue-5657
Adding support for the logRestoreStartTs option in the PITR restore spec.
What is changed and how does it work?
With this update, the Point-in-Time Recovery (PITR) restore mode allows users to apply PITR logs within a specified time range. Specifically, users can define the start and end timestamps using the logRestoreStartTs(start timestamp) and pitrRestoredTs(end timestamp) options in the restore spec, respectively. This enhancement enables more precise control over the restoration process, allowing users to restore data to an exact point in time by specifying the interval of PITR logs to be applied.
After this change the user can use a combination of pitrFullBackupStorageProvider and pitrRestoredTs, to restore the full backup snapshot and apply PITR logs. or else a combination of the logRestoreStartTs and pitrRestoredTs options in the restore spec to apply PITR logs within a specified time.
If the user fails to specify either the pitrFullBackupStorageProvider or logRestoreStartTs option in the restore specification, the restore job will result in an error.
Code changes
Tests
PITR up to mentioned restoreTs along with full backup restore.
TiDBCluster
TiDBCluster
to test the backup restoration.Apply PITR logs within a specified time range.
Create a
restore-pitr.yaml
file as follows, then usekubectl apply
to apply the yaml.`
restore-pitr.yaml
`
Side effects
Related changes
Release Notes
NONE