-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
120600: backupccl: allow for empty database and schema only online restore r=dt a=msbutler This patch ensures online restore works on empty databases and for schema only restore. This patch also disallows verify_backup_table_data restores, which uses the traditional restore data processor. Release note: none Epic: none Co-authored-by: Michael Butler <[email protected]>
- Loading branch information
Showing
7 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
pkg/ccl/backupccl/testdata/backup-restore/online-restore-empty-database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This test ensures that online restore works on an empty database. | ||
|
||
reset test-nodelocal | ||
---- | ||
|
||
new-cluster name=s1 disable-tenant | ||
---- | ||
|
||
|
||
exec-sql | ||
CREATE DATABASE d; | ||
---- | ||
|
||
exec-sql | ||
BACKUP INTO 'nodelocal://1/cluster/'; | ||
---- | ||
|
||
exec-sql | ||
RESTORE DATABASE d FROM LATEST IN 'nodelocal://1/cluster/' with EXPERIMENTAL DEFERRED COPY, new_db_name='d2'; | ||
---- | ||
|
||
query-sql retry | ||
SELECT count(*) FROM [SHOW JOBS] WHERE job_type='RESTORE' and status='succeeded'; | ||
---- | ||
2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters