-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
79536: sql: gate tenant's multi-region abstraction usage behind cluster setting r=arulajmani a=arulajmani This patch introduces a tenant read-only cluster setting called `sql.multi_region.allow_abstractions_for_secondary_tenants.enabled` which allows the operator to control if secondary tenants can make use of multi-region abstractions. It defaults to false. This setting is checked against when creating new MR databases or altering existing ones to make use of MR features (by setting the primary region). It has nothing to do with MR databases that may have been created previously which could happen if this setting was ever flipped to true by the operator. This setting doesn't effect the system tenant. It also takes precedence over `sql.defaults.primary_region`, which is tenant writeable. Release note (sql change): introduces new cluster setting which allows the operator to control if a secondary tenant can make use of MR abstractions. The setting is called `sql.multi_region.allow_abstractions_for_secondary_tenants.enabled`. Co-authored-by: arulajmani <[email protected]>
- Loading branch information
Showing
17 changed files
with
295 additions
and
32 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
1 change: 1 addition & 0 deletions
1
pkg/ccl/logictestccl/testdata/logic_test/multi_region_default_primary_region
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
1 change: 1 addition & 0 deletions
1
pkg/ccl/logictestccl/testdata/logic_test/multi_region_drop_region
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
1 change: 1 addition & 0 deletions
1
pkg/ccl/logictestccl/testdata/logic_test/multi_region_privileges
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
10 changes: 10 additions & 0 deletions
10
...l/logictestccl/testdata/logic_test/multi_region_secondary_tenants_abstractions_disallowed
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,10 @@ | ||
# LogicTest: multiregion-9node-3region-3azs-tenant | ||
|
||
statement error pq: setting sql.multi_region.allow_abstractions_for_secondary_tenants.enabled disallows use of multi-region abstractions | ||
CREATE DATABASE db PRIMARY REGION "us-east1" | ||
|
||
statement ok | ||
CREATE DATABASE db | ||
|
||
statement error pq: setting sql.multi_region.allow_abstractions_for_secondary_tenants.enabled disallows use of multi-region abstractions | ||
ALTER DATABASE db SET PRIMARY REGION "us-east-1" |
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
2 changes: 1 addition & 1 deletion
2
pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs
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
1 change: 1 addition & 0 deletions
1
pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_auto_rehoming
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
1 change: 1 addition & 0 deletions
1
pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_placement_restricted
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
1 change: 1 addition & 0 deletions
1
pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_rename_column
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
1 change: 1 addition & 0 deletions
1
pkg/ccl/logictestccl/testdata/logic_test/regional_by_table_placement_restricted
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.