Skip to content

Commit

Permalink
backupccl: use correct version gate for restore checkpointing
Browse files Browse the repository at this point in the history
PR #97862 introduced a subtle bug which allowed the new restore checkpointing
policy to take effect before the 23_1 migrations occured. This patch ensures
the new policy only takes effect after all migrations occur.

Release note: None

Epic: None
  • Loading branch information
msbutler committed Mar 14, 2023
1 parent 2d63378 commit 46e55ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ func TestBackupRestoreResume(t *testing.T) {
},
},
// Required because restore checkpointing is version gated.
clusterversion.ByKey(clusterversion.V23_1Start),
clusterversion.ByKey(clusterversion.V23_1),
)
// If the restore properly took the (incorrect) low-water mark into account,
// the first half of the table will be missing.
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/restore_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func restore(
return emptyRowCount, err
}

on231 := clusterversion.ByKey(clusterversion.V23_1Start).LessEq(job.Payload().CreationClusterVersion)
on231 := clusterversion.ByKey(clusterversion.V23_1).LessEq(job.Payload().CreationClusterVersion)
progressTracker, err := makeProgressTracker(
dataToRestore.getSpans(),
job.Progress().Details.(*jobspb.Progress_Restore).Restore.Checkpoint,
Expand Down

0 comments on commit 46e55ac

Please sign in to comment.