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 scheduled backup if resumed on different cluster #111578
Conversation
c273cba
to
e215128
Compare
@dt @adityamaru This is ready for a look. The first two commits are getting reviewed in other prs: Test server change is here, and the clusterID/Version I have one high level design q: should I check for the clusterID in the |
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.
2¢: firing up a whole c2c end to end test with two tenants and cutover and schedules all involved feels like a kinda expensive way to cover this one behavior of schedules to me, and far away from the code in question. I might vote to just test this by manually creating a schedule with a different (and empty!) creator in create_scheduled_backup_test.go, removing all streamingccl/ diffs?
b2c50ae
to
5840e76
Compare
@dt ready for another look! Added a better test in create_scheduled_backup_test.go |
050bc49
to
800de37
Compare
Previously, after cluster restore or c2c cutover, a backed up/ replicated backup schedule would begin executing on the new cluster. If the backup / source cluster was still available and executing the schedule, then the two schedules would compete to run, as outlined in cockroachdb#108028. This patch prevents this poor UX by pausing the backup schedule if the schedule realizes it is running on a new cluster. It is then up to the user to resume backups on the new cluster and prevent the backup collision problem. Fixes cockroachdb#108028 Release note (sql change): if a scheduled backup resumes on a new cluster (e.g. after C2C cutover or a tenant restore), the backup schedule will pause. The user may resume the schedule without changing it, but should take special care to ensure no other schedule is backing up to the same collection. The user may also want to cancel the paused schedule and start a new one.
800de37
to
ace81b6
Compare
This patch adds an e2e c2c test to verify that replicated backup schedules pause on the destination tenant after cutover. This functionality was added in cockroachdb#111578. Informs cockroachdb#108028 Release note: none
bors r=dt |
Build succeeded: |
This patch adds an e2e c2c test to verify that replicated backup schedules pause on the destination tenant after cutover. This functionality was added in cockroachdb#111578. Informs cockroachdb#108028 Release note: none
111804: streamingccl: verify backup schedule pauses after cutover r=stevendanna a=msbutler This patch adds an e2e c2c test to verify that replicated backup schedules pause on the destination tenant after cutover. This functionality was added in #111578. Informs #108028 Release note: none Co-authored-by: Michael Butler <butler@cockroachlabs.com>
Previously, after cluster restore or c2c cutover, a backed up/ replicated
backup schedule would begin executing on the new cluster. If the backup /
source cluster was still available and executing the schedule, then the two
schedules would compete to run, as outlined in #108028.
This patch prevents this poor UX by pausing the backup schedule if the schedule
realizes it is running on a new cluster. It is then up to the user to resume
backups on the new cluster and prevent the backup collision problem.
Fixes #108028
Release note (sql change): if a scheduled backup resumes on a new cluster (e.g.
after C2C cutover or a tenant restore), the backup schedule will pause. The
user may resume the schedule without changing it, but should take special care
to ensure no other schedule is backing up to the same collection. The user may
also want to cancel the paused schedule and start a new one.