-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backupccl: pause backup schedule in TestFullClusterBackup #71907
Conversation
Currently the backup schedule in TestFullClusterBackup can be processed by the job scheduler in the original DB after the backup has been taken, thus causing a difference between the original and restored clusters. Prevent this processing by setting the first run in the future and pausing the schedule. Fixes cockroachdb#71435 Release note: None
f4f35bb
to
5de7501
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @dt and @rhu713)
pkg/ccl/backupccl/full_cluster_backup_restore_test.go, line 151 at r1 (raw file):
// Populate system.scheduled_jobs table with a first run in the future to prevent immediate adoption. firstRun := timeutil.Now().Add(time.Hour).Format(timeutil.TimestampWithoutTZFormat) sqlDB.Exec(t, `CREATE SCHEDULE FOR BACKUP data.bank INTO $1 RECURRING '@hourly' FULL BACKUP ALWAYS WITH SCHEDULE OPTIONS first_run = $2`, LocalFoo, firstRun)
Ah nice. I think when we were looking at the test failure we erroneously misread the output as being about the sql stats compaction job. I wonder though, is it possible that the same sort of issue happens with the stats compaction job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @dt and @stevendanna)
pkg/ccl/backupccl/full_cluster_backup_restore_test.go, line 151 at r1 (raw file):
Previously, stevendanna (Steven Danna) wrote…
Ah nice. I think when we were looking at the test failure we erroneously misread the output as being about the sql stats compaction job. I wonder though, is it possible that the same sort of issue happens with the stats compaction job?
I think it's unlikely for the stats compaction job since there's a 2-5 minute delay for the first scan of the job scheduler, and the stats jobs are paused right away in the test. But I think in theory it could happen:
https://github.com/cockroachdb/cockroach/blob/master/pkg/jobs/job_scheduler.go#L411
bors r+ |
Build failed (retrying...): |
Build succeeded: |
Currently the backup schedule in TestFullClusterBackup can be processed by the
job scheduler in the original DB after the backup has been taken, thus causing
a difference between the original and restored clusters. Prevent this
processing by setting the first run in the future and pausing the schedule.
Fixes #71435
Release note: None