-
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.
[WIP] backupccl: add feature flag support for backup command
Adds a cluster setting to toggle a feature flag for the BACKUP command off and on. It is being introduced to address a Cockroach Cloud SRE use case of wanting to disable certain categories of features in case of cluster failure. Release note category, description TBD Release note: None
- Loading branch information
angelapwen
committed
Nov 11, 2020
1 parent
237284b
commit d16438f
Showing
3 changed files
with
36 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
new-server name=s1 | ||
---- | ||
|
||
# Test running backup when feature flag is disabled. | ||
exec-sql | ||
CREATE DATABASE d; | ||
CREATE TABLE d.t (x INT); | ||
INSERT INTO d.t VALUES (1), (2), (3); | ||
---- | ||
|
||
# Cluster backup should fail. | ||
exec-sql | ||
SET CLUSTER SETTING feature.backup.enabled = FALSE; | ||
BACKUP TO 'nodelocal://0/test-root/'; | ||
---- | ||
pq: BACKUP feature was disabled by the database administrator. | ||
|
||
# Test running backup when feature flag is enabled. | ||
exec-sql | ||
SET CLUSTER SETTING feature.backup.enabled = TRUE; | ||
BACKUP TO 'nodelocal://0/test-root/'; | ||
---- |