Skip to content

fix(replication-restore): adjust retain latest mvcc fallback#6972

Open
RidRisR wants to merge 1 commit into
pingcap:release-1.xfrom
RidRisR:fix-restore-retain-mvcc-phase2
Open

fix(replication-restore): adjust retain latest mvcc fallback#6972
RidRisR wants to merge 1 commit into
pingcap:release-1.xfrom
RidRisR:fix-restore-retain-mvcc-phase2

Conversation

@RidRisR

@RidRisR RidRisR commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Added a backup-manager restore flag --replicationRetainLatestMVCCVersion, defaulting to true, to control whether replication restore passes BR --retain-latest-mvcc-version.
  • Made replication BR flag construction omit --retain-latest-mvcc-version when that option is false.
  • Updated replication phase-2 Job mutation to pass --replicationRetainLatestMVCCVersion=false for log restore when CompactSettled=True but the compact result reason is not AllShardsComplete.
  • Updated focused unit coverage for BR flag construction and phase-2 Job args.

Why

When compact backup does not fully complete, phase-2 log restore should fall back without retaining latest MVCC versions. The controller already gates phase-2 on RestoreCompactSettled; this change uses that marker reason to choose the BR argument while keeping the existing default behavior for successful and manual replication restore paths.

Validation

git diff --check upstream/release-1.x..HEAD
GOCACHE=/tmp/tidb-operator-go-cache go test -count=1 ./cmd/backup-manager/app/cmd ./cmd/backup-manager/app/restore ./pkg/backup/restore

@ti-chi-bot

ti-chi-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot Bot requested a review from howardlau1999 July 2, 2026 05:12
@ti-chi-bot ti-chi-bot Bot added the size/M label Jul 2, 2026
@RidRisR RidRisR marked this pull request as ready for review July 2, 2026 05:23
@ti-chi-bot

ti-chi-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@Leavrth: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot

ti-chi-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Leavrth
Once this PR has been reviewed and has the lgtm label, please assign hanlins for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot

ti-chi-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@RidRisR: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-e2e-kind-across-kubernetes a0de4ba link false /test pull-e2e-kind-across-kubernetes
pull-e2e-kind-br a0de4ba link false /test pull-e2e-kind-br

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants