Skip to content
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: improve error message when restoring AOST before GC TTL #47105

Closed
pbardea opened this issue Apr 6, 2020 · 0 comments · Fixed by #66025
Closed

backupccl: improve error message when restoring AOST before GC TTL #47105

pbardea opened this issue Apr 6, 2020 · 0 comments · Fixed by #66025

Comments

@pbardea
Copy link
Contributor

pbardea commented Apr 6, 2020

We could improve the error message when restoring before the GC TTL of the backup.

Reproduction Steps

CREATE DATABASE my_db;
CREATE TABLE my_db.my_table (a int);
BACKUP DATABASE my_db TO 'nodelocal://1/my_backup' WITH revision_history;
DROP DATABASE my_db CASCADE;
RESTORE DATABASE my_db FROM 'nodelocal://1/my_backup' AS OF SYSTEM TIME '-100h';

Note: GC TTL of the backup was 25h, so any RESTORE attempting to RESTORE before then should be invalid.

The error returned is: ERROR: unknown database "my_db", but it would be better if we returned something along the lines of ERROR: invalid RESTORE timestamp: supplied backups do not cover requested time.

annezhu98 pushed a commit to annezhu98/cockroach that referenced this issue Jun 7, 2021
Previously, if a target database was not found for a RESTORE, whether it's due to AOST being before GC TTL or attempting to restore a database that has never existed, the same error message gets printed.

Since the errors do not occur for the same reason, having different error messages would be more informative for users to understand the cause of error.

Resolves: cockroachdb#47105

Release note (bug fix): more accurate error message for restoring AOST before GC TTL
craig bot pushed a commit that referenced this issue Jun 7, 2021
66025: backupccl: error message for restoring databases with AOST before GC TTL r=adityamaru a=annezhu98

Previously, if a target database was not found for a RESTORE, whether it's due to AOST being before GC TTL or attempting to restore a database that has never existed, the same error message gets printed.

Since the errors do not occur for the same reason, having different error messages would be more informative for users to understand the cause of error.

Resolves: #47105

Release note (bug fix): more accurate error message for restoring AOST before GC TTL

Co-authored-by: Anne Zhu <[email protected]>
@craig craig bot closed this as completed in 3e99b3b Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants