-
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.
95562: backupccl: explicitly parse SHOW BACKUP options r=benbardin a=msbutler Fixes: #82912 Release note (sql change): Previously, SHOW BACKUP options would get parsed as `kv_options`, which meant that a user could not pass multiple values to a show backup option, causing feature gaps in SHOW BACKUP relative to BACKUP and RESTORE. This patch rewrites the show backup option parser, closing the following feature gaps: 1. A user can now pass and check multiple KMS URIs in SHOW BACKUP 2. A user can pass locality aware incremental_locations, allowing a user to also pass the check_files parameter to a locality aware backup chain that also specifies the backup incremental location. Note that while this patch introduces a couple new words to the CRDB SQL syntax, the same SHOW BACKUP options should remain documented, specifically: - [public option] -> value - AS_JSON -> N/A - CHECK_FILES -> N/A - INCREMENTAL_LOCATION -> string, with potentially multiple uris - DEBUG_IDS -> N/A - KMS -> string, with potentially multiple uris - PRIVILEGES -> N/A - ENCRYPTION_PASSPHRASE -> string 95745: sql: remove redundant session iteration r=xinhaoz,yuzefovich a=ecwall Fixes #95743 Improves session/query cancelation with the following 1) Replaces session scanning by session ID with map lookup. 2) Replaces active query scanning by query ID with map lookup (session containing query to cancel is still scanned for). 3) Does not serialize entire session to get session username or id. Informs #77676 77676 was closed but some test cases incorrectly mentioned that addressing 77676 fixed them. This PR correctly fixes these test cases. Release note: None Co-authored-by: Michael Butler <[email protected]> Co-authored-by: Evan Wall <[email protected]>
- Loading branch information
Showing
15 changed files
with
580 additions
and
392 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,9 @@ | ||
show_backup_stmt ::= | ||
'SHOW' 'BACKUPS' 'IN' location_opt_list | ||
| 'SHOW' 'BACKUP' show_backup_details 'FROM' string_or_placeholder 'IN' string_or_placeholder_opt_list 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' show_backup_details 'FROM' string_or_placeholder 'IN' string_or_placeholder_opt_list 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' show_backup_details 'FROM' string_or_placeholder 'IN' string_or_placeholder_opt_list | ||
| 'SHOW' 'BACKUP' subdirectory 'IN' location_opt_list 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' subdirectory 'IN' location_opt_list 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' subdirectory 'IN' location_opt_list | ||
| 'SHOW' 'BACKUP' string_or_placeholder 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' string_or_placeholder 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' string_or_placeholder | ||
| 'SHOW' 'BACKUP' 'SCHEMAS' location 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' 'SCHEMAS' location 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' 'SCHEMAS' location | ||
| 'SHOW' 'BACKUP' 'FILES' string_or_placeholder 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' 'FILES' string_or_placeholder 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' 'FILES' string_or_placeholder | ||
| 'SHOW' 'BACKUP' 'RANGES' string_or_placeholder 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' 'RANGES' string_or_placeholder 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' 'RANGES' string_or_placeholder | ||
| 'SHOW' 'BACKUP' 'VALIDATE' string_or_placeholder 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' 'VALIDATE' string_or_placeholder 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' 'VALIDATE' string_or_placeholder | ||
| 'SHOW' 'BACKUP' show_backup_details 'FROM' string_or_placeholder 'IN' string_or_placeholder_opt_list opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' subdirectory 'IN' location_opt_list opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' string_or_placeholder opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' 'SCHEMAS' location opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' 'FILES' string_or_placeholder opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' 'RANGES' string_or_placeholder opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' 'VALIDATE' string_or_placeholder opt_with_show_backup_options |
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
Oops, something went wrong.