Skip to content

backupccl: only restore system tables included in backup#55685

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
pbardea:fix-system-table-restoration
Oct 20, 2020
Merged

backupccl: only restore system tables included in backup#55685
craig[bot] merged 2 commits intocockroachdb:masterfrom
pbardea:fix-system-table-restoration

Conversation

@pbardea
Copy link
Copy Markdown
Contributor

@pbardea pbardea commented Oct 19, 2020

Before this commit, we would assume that all of the system tables that
we wanted to restore were present in the backup. However, this is not
necessarily true since system tables can be added between releases.

Release note (bug fix): Previously cluster backups taken from before
20.2 could not be restored in 20.2 clusters, with an error message about
failing to restore a system table. This is now fixed.

@pbardea pbardea requested review from a team, dt and miretskiy October 19, 2020 14:08
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@pbardea pbardea force-pushed the fix-system-table-restoration branch from 7cc8c21 to d93370f Compare October 19, 2020 14:11
@pbardea
Copy link
Copy Markdown
Contributor Author

pbardea commented Oct 19, 2020

This is an initial stab at it, but wanted to solicit any feedback early on. Adding x-version testing now for cluster restore.

Copy link
Copy Markdown
Contributor

@miretskiy miretskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me on the first pass. Let's see the tests. :lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @dt, @miretskiy, and @pbardea)


pkg/ccl/backupccl/restore_old_versions_test.go, line 107 at r1 (raw file):

		)

		//

extra comment?

@miretskiy miretskiy self-requested a review October 19, 2020 16:10
@pbardea pbardea force-pushed the fix-system-table-restoration branch from d93370f to 5e41462 Compare October 19, 2020 19:42
@pbardea
Copy link
Copy Markdown
Contributor Author

pbardea commented Oct 19, 2020

Update: pushed the test, but now it looks like DROP DATABASE jobs are hanging as soon as we restore any system table data from the test backup. Investigating.

@pbardea pbardea force-pushed the fix-system-table-restoration branch 2 times, most recently from 319f7c5 to 684ea08 Compare October 19, 2020 22:06
@pbardea pbardea force-pushed the fix-system-table-restoration branch 2 times, most recently from 042f70a to 97cb3e4 Compare October 19, 2020 22:30
Including the cluster version in cluster restore might decrease the
cluster version. We have seen this cause issues where DROP DATABASES
stop working.

Release note: None
Before this commit, we would assume that all of the system tables that
we wanted to restore were present in the backup. However, this is not
necessarily true since system tables can be added between releases.

Release note (bug fix): Previously cluster backups taken from before
20.2 could not be restored in 20.2 clusters, with an error message about
failing to restore a system table. This is now fixed.
@pbardea
Copy link
Copy Markdown
Contributor Author

pbardea commented Oct 20, 2020

TFTRs!
bors r=dt

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 20, 2020

Build succeeded:

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants