diff --git a/pkg/ccl/logictestccl/testdata/logic_test/alter_table_locality b/pkg/ccl/logictestccl/testdata/logic_test/alter_table_locality index 4ff77c1ccb28..86089e6fc02d 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/alter_table_locality +++ b/pkg/ccl/logictestccl/testdata/logic_test/alter_table_locality @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-zone-configs-for-secondary-tenants allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/auto_rehoming b/pkg/ccl/logictestccl/testdata/logic_test/auto_rehoming index c846dac01ef0..da84edfc58f7 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/auto_rehoming +++ b/pkg/ccl/logictestccl/testdata/logic_test/auto_rehoming @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: local statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/global_placement_restricted b/pkg/ccl/logictestccl/testdata/logic_test/global_placement_restricted index eeb06ebc6c86..d89af9daef28 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/global_placement_restricted +++ b/pkg/ccl/logictestccl/testdata/logic_test/global_placement_restricted @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region b/pkg/ccl/logictestccl/testdata/logic_test/multi_region index 17259ab15137..8b4ccbc27b96 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # knob-opt: sync-event-log # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_alter_table_regional_by_row b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_alter_table_regional_by_row index 67c9670fce4f..8c687d54cf4c 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_alter_table_regional_by_row +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_alter_table_regional_by_row @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs # This file contains a regression test for ALTER TABLE ... REGIONAL BY ROW diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_backup b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_backup index 435d1511a339..d5ba66b39d78 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_backup +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_backup @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-zone-configs-for-secondary-tenants allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-no-los # Tests in this file assume no multi-region tenant setup as tenants have no diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_default_primary_region b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_default_primary_region index 5909df653ea9..b935ee5eab7d 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_default_primary_region +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_default_primary_region @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_drop_region b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_drop_region index d4ff2715951d..8d10eaacc2b1 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_drop_region +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_drop_region @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los query TTTTT diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_foreign_key_lookup_join b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_foreign_key_lookup_join index b4a0c0e267e9..7b9f7bdd48a9 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_foreign_key_lookup_join +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_foreign_key_lookup_join @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs !metamorphic-batch-sizes # Set the closed timestamp interval to be short to shorten the amount of time diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_import_export b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_import_export index f5e19d060fef..404e706efc03 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_import_export +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_import_export @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off multiregion-9node-3region-3azs-no-los # Tests in this file assume no multi-region tenant setup as tenants have no diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_locality_optimized_search_query_behavior b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_locality_optimized_search_query_behavior index 93ecef823b8e..38c1c717ecb9 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_locality_optimized_search_query_behavior +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_locality_optimized_search_query_behavior @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs # TODO(#75864): enable multiregion-9node-3region-3azs-tenant. diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_privileges b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_privileges index 5d77bb2cbd52..219db639ffd0 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_privileges +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_privileges @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los user root diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_query_behavior b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_query_behavior index 8b33f9d0f7e2..6307471dbd81 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_query_behavior +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_query_behavior @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-no-los # TODO(#75864): enable multiregion-9node-3region-3azs-tenant. diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_remote_access_error b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_remote_access_error index a118c2e8c18e..47cba1eb86be 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_remote_access_error +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_remote_access_error @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs !metamorphic-batch-sizes # TODO(msirek): Make this test work with the multiregion-9node-3region-3azs-vec-off config # Currently this test and other multiregion tests may flake when run under diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_show b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_show index 73370f260bf1..351676c8c8f0 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_show +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_show @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_config_extensions b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_config_extensions index 2177952123f6..843d742526c6 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_config_extensions +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_config_extensions @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant query TTTTT diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs index bc40157ddbe8..22b34483342f 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-zone-configs-for-secondary-tenants allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los query TTTTT diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs_long_regions b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs_long_regions index e850b8e89f53..e3d408b0fb57 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs_long_regions +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_zone_configs_long_regions @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-3node-3superlongregions query TTTTT diff --git a/pkg/ccl/logictestccl/testdata/logic_test/partitioning b/pkg/ccl/logictestccl/testdata/logic_test/partitioning index 63a5ccd8d592..10c69840285c 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/partitioning +++ b/pkg/ccl/logictestccl/testdata/logic_test/partitioning @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-zone-configs-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true # LogicTest: local statement error syntax diff --git a/pkg/ccl/logictestccl/testdata/logic_test/partitioning_hash_sharded_index_mr b/pkg/ccl/logictestccl/testdata/logic_test/partitioning_hash_sharded_index_mr index ffef198537a2..0854dcb80c46 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/partitioning_hash_sharded_index_mr +++ b/pkg/ccl/logictestccl/testdata/logic_test/partitioning_hash_sharded_index_mr @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/placement b/pkg/ccl/logictestccl/testdata/logic_test/placement index 17896cd6df86..ae033c54dd06 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/placement +++ b/pkg/ccl/logictestccl/testdata/logic_test/placement @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off multiregion-9node-3region-3azs-no-los statement error PLACEMENT requires that the session setting enable_multiregion_placement_policy is enabled diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row index 09e0d5130bca..253577f0737b 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-zone-configs-for-secondary-tenants allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_auto_rehoming b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_auto_rehoming index b6b7d7f7d6da..a1ad9464bd06 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_auto_rehoming +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_auto_rehoming @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_hash_sharded_index b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_hash_sharded_index index f59056b5b821..b4b6d2af579f 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_hash_sharded_index +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_hash_sharded_index @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_hash_sharded_index_query_plan b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_hash_sharded_index_query_plan index ae0a46f8898a..2fdaeedb590b 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_hash_sharded_index_query_plan +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_hash_sharded_index_query_plan @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs !metamorphic-batch-sizes # TODO(#75864): enable multiregion-9node-3region-3azs-tenant diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_placement_restricted b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_placement_restricted index bd4e8e5cb81e..fe6b5e66d2ca 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_placement_restricted +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_placement_restricted @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_query_behavior b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_query_behavior index a16b8c0188eb..7c9410615748 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_query_behavior +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_query_behavior @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs !metamorphic-batch-sizes # TODO(#75864): enable multiregion-9node-3region-3azs-tenant and/or revert # the commit that split these changes out. diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_rename_column b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_rename_column index 509ef56c9866..13d0d476e40e 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_rename_column +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_rename_column @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los # This test seems to flake (#60717). diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_table_placement_restricted b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_table_placement_restricted index 1aee05355113..38720002d760 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_table_placement_restricted +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_table_placement_restricted @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/secondary_region b/pkg/ccl/logictestccl/testdata/logic_test/secondary_region index e6b3ce67c46a..058252ff23ab 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/secondary_region +++ b/pkg/ccl/logictestccl/testdata/logic_test/secondary_region @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-15node-5region-3azs query TTTTT colnames diff --git a/pkg/ccl/logictestccl/testdata/logic_test/super_regions b/pkg/ccl/logictestccl/testdata/logic_test/super_regions index 4360b0ab8313..a29c7fdb362d 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/super_regions +++ b/pkg/ccl/logictestccl/testdata/logic_test/super_regions @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-15node-5region-3azs statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/super_regions_backup b/pkg/ccl/logictestccl/testdata/logic_test/super_regions_backup index 9597c16dc7b7..ed6b2ea206ab 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/super_regions_backup +++ b/pkg/ccl/logictestccl/testdata/logic_test/super_regions_backup @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-15node-5region-3azs statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/super_regions_cluster_settings b/pkg/ccl/logictestccl/testdata/logic_test/super_regions_cluster_settings index 0c1d40e0389e..8b5d8ee7bf43 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/super_regions_cluster_settings +++ b/pkg/ccl/logictestccl/testdata/logic_test/super_regions_cluster_settings @@ -1,4 +1,4 @@ -# tenant-cluster-setting-override-opt: allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # LogicTest: multiregion-15node-5region-3azs statement ok diff --git a/pkg/ccl/logictestccl/testdata/logic_test/zone_config_secondary_tenants b/pkg/ccl/logictestccl/testdata/logic_test/zone_config_secondary_tenants index f7abf02c9164..1fad9ed8391f 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/zone_config_secondary_tenants +++ b/pkg/ccl/logictestccl/testdata/logic_test/zone_config_secondary_tenants @@ -1,5 +1,5 @@ # LogicTest: 3node-tenant -# tenant-cluster-setting-override-opt: allow-zone-configs-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true # Zone config logic tests that are only meant to work for secondary tenants. statement ok diff --git a/pkg/sql/logictest/logic.go b/pkg/sql/logictest/logic.go index f91a488bcdb3..d9c5f6b3e622 100644 --- a/pkg/sql/logictest/logic.go +++ b/pkg/sql/logictest/logic.go @@ -175,15 +175,7 @@ import ( // the test is run as the system tenant. // // The directives line looks like: -// # tenant-cluster-setting-override-opt: opt1 opt2 -// -// The options are: -// - allow-zone-configs-for-secondary-tenants: If specified, secondary tenants -// are allowed to alter their zone configurations. -// - allow-multi-region-abstractions-for-secondary-tenants: If specified, -// secondary tenants are allowed to make use of multi-region abstractions. -// - allow-split-at-for-secondary-tenants: If specified, -// secondary tenants are allowed to run ALTER TABLE ... SPLIT AT. +// # tenant-cluster-setting-override-opt: setting_name1=setting_value1 setting_name2=setting_value2 // // ########################################### // CLUSTER OPTION DIRECTIVES @@ -953,11 +945,10 @@ type logicTest struct { clusterOpts []clusterOpt // knobOpts are the options used to create testing knobs. knobOpts []knobOpt - // tenantClusterSettingOverrideOpts are the options used by the host cluster - // to configure tenant setting overrides during setup. They're persisted here - // because a cluster can be recreated throughout the lifetime of a test, and - // we should override tenant settings each time this happens. - tenantClusterSettingOverrideOpts []tenantClusterSettingOverrideOpt + // toa contains tenant overrides that are persisted here because a cluster + // can be recreated throughout the lifetime of a test, and we should use + // tenant overrides each time this happens. + toa tenantOverrideArgs // cluster is the test cluster against which we are testing. This cluster // may be reset during the lifetime of the test. cluster serverutils.TestClusterInterface @@ -1295,10 +1286,7 @@ func (t *logicTest) newTestServerCluster(bootstrapBinaryPath string, upgradeBina // initial cluster to be used in a test, or when creating additional test // clusters, after logicTest.setup() has been called. func (t *logicTest) newCluster( - serverArgs TestServerArgs, - clusterOpts []clusterOpt, - knobOpts []knobOpt, - tenantClusterSettingOverrideOpts []tenantClusterSettingOverrideOpt, + serverArgs TestServerArgs, clusterOpts []clusterOpt, knobOpts []knobOpt, toa tenantOverrideArgs, ) { var corpusCollectionCallback func(p scplan.Plan, stageIdx int) error if serverArgs.DeclarativeCorpusCollection && t.declarativeCorpusCollector != nil { @@ -1535,14 +1523,12 @@ func (t *logicTest) newCluster( // If we've created a tenant (either explicitly, or probabilistically and // implicitly) set any necessary cluster settings to override blocked // behavior. - clusterSettingOverrideArgs := &tenantClusterSettingOverrideArgs{} if cfg.UseTenant || t.cluster.StartedDefaultTestTenant() { - for _, opt := range tenantClusterSettingOverrideOpts { - opt.apply(clusterSettingOverrideArgs) - } conn := t.cluster.StorageClusterConn() - if clusterSettingOverrideArgs.overrideMultiTenantZoneConfigsAllowed { + clusterSettings := toa.clusterSettings + _, ok := clusterSettings[sql.SecondaryTenantZoneConfigsEnabled.Key()] + if ok { // We reduce the closed timestamp duration on the host tenant so that the // setting override can propagate to the tenant faster. if _, err := conn.Exec( @@ -1555,41 +1541,12 @@ func (t *logicTest) newCluster( ); err != nil { t.Fatal(err) } - - // Allow secondary tenants to set zone configurations if the configuration - // indicates as such. As this is a tenant read-only cluster setting, only - // the operator is allowed to set it. - if _, err := conn.Exec( - "ALTER TENANT [$1] SET CLUSTER SETTING sql.zone_configs.allow_for_secondary_tenant.enabled = true", - serverutils.TestTenantID().ToUint64(), - ); err != nil { - t.Fatal(err) - } } - if clusterSettingOverrideArgs.overrideMultiTenantMultiRegionAbstractionsAllowed { - // Allow secondary tenants to make use of multi-region abstractions if the - // configuration indicates as such. As this is a tenant read-only cluster - // setting, only the operator is allowed to set it. - if _, err := conn.Exec( - fmt.Sprintf( - "ALTER TENANT [$1] SET CLUSTER SETTING %s = true", - sql.SecondaryTenantsMultiRegionAbstractionsEnabledSettingName, - ), - serverutils.TestTenantID().ToUint64(), - ); err != nil { - t.Fatal(err) - } - } - - if clusterSettingOverrideArgs.overrideMultiTenantSplitAtAllowed { - if _, err := conn.Exec( - fmt.Sprintf( - "ALTER TENANT [$1] SET CLUSTER SETTING %s = true", - sql.SecondaryTenantSplitAtEnabled.Key(), - ), - serverutils.TestTenantID().ToUint64(), - ); err != nil { + tenantID := serverutils.TestTenantID().ToUint64() + for name, value := range clusterSettings { + query := fmt.Sprintf("ALTER TENANT [$1] SET CLUSTER SETTING %s = %s", name, value) + if _, err := conn.Exec(query, tenantID); err != nil { t.Fatal(err) } } @@ -1722,16 +1679,9 @@ func (t *logicTest) newCluster( }) } - if clusterSettingOverrideArgs.overrideMultiTenantZoneConfigsAllowed { + for name, value := range toa.clusterSettings { t.waitForTenantReadOnlyClusterSettingToTakeEffectOrFatal( - "sql.zone_configs.allow_for_secondary_tenant.enabled", "true", params.ServerArgs.Insecure, - ) - } - if clusterSettingOverrideArgs.overrideMultiTenantMultiRegionAbstractionsAllowed { - t.waitForTenantReadOnlyClusterSettingToTakeEffectOrFatal( - sql.SecondaryTenantsMultiRegionAbstractionsEnabledSettingName, - "true", - params.ServerArgs.Insecure, + name, value, params.ServerArgs.Insecure, ) } @@ -1808,7 +1758,7 @@ func (t *logicTest) resetCluster() { t.Fatal("resetting the cluster before server args were set") } serverArgs := *t.serverArgs - t.newCluster(serverArgs, t.clusterOpts, t.knobOpts, t.tenantClusterSettingOverrideOpts) + t.newCluster(serverArgs, t.clusterOpts, t.knobOpts, t.toa) } // setup creates the initial cluster for the logic test and populates the @@ -1820,14 +1770,14 @@ func (t *logicTest) setup( serverArgs TestServerArgs, clusterOpts []clusterOpt, knobOpts []knobOpt, - tenantClusterSettingOverrideOpts []tenantClusterSettingOverrideOpt, + toa tenantOverrideArgs, ) { t.cfg = cfg t.serverArgs = &serverArgs t.serverArgs.DeclarativeCorpusCollection = cfg.DeclarativeCorpusCollection t.clusterOpts = clusterOpts[:] t.knobOpts = knobOpts[:] - t.tenantClusterSettingOverrideOpts = tenantClusterSettingOverrideOpts[:] + t.toa = toa // TODO(pmattis): Add a flag to make it easy to run the tests against a local // MySQL or Postgres instance. tempExternalIODir, tempExternalIODirCleanup := testutils.TempDir(t.rootT) @@ -1880,7 +1830,7 @@ func (t *logicTest) setup( } t.newTestServerCluster(bootstrapBinaryPath, upgradeBinaryPath) } else { - t.newCluster(serverArgs, t.clusterOpts, t.knobOpts, t.tenantClusterSettingOverrideOpts) + t.newCluster(serverArgs, t.clusterOpts, t.knobOpts, t.toa) } // Only create the test database on the initial cluster, since cluster restore @@ -1905,64 +1855,10 @@ CREATE DATABASE test; USE test; t.unsupported = 0 } -type tenantClusterSettingOverrideArgs struct { - // If set, the sql.zone_configs.allow_for_secondary_tenant.enabled default - // is set to true by the host. This allows logic tests that run on - // secondary tenants to use zone configurations. - overrideMultiTenantZoneConfigsAllowed bool - // If set, the - // sql.multi_region.allow_abstractions_for_secondary_tenants.enabled default - // is set to true by the host. This allows logic tests that run on secondary - // tenants to make use of multi-region abstractions. - overrideMultiTenantMultiRegionAbstractionsAllowed bool - // If set, the sql.split_at.allow_for_secondary_tenant.enabled default - // is set to true by the host. This allows logic tests that run on - // secondary tenants to run ALTER TABLE ... SPLIT AT. - overrideMultiTenantSplitAtAllowed bool -} - -// tenantClusterSettingOverrideOpt is implemented by options for configuring -// tenant setting overrides during setup. For tests that run on the system -// tenant, these options have no effect. -type tenantClusterSettingOverrideOpt interface { - apply(*tenantClusterSettingOverrideArgs) -} - -// tenantClusterSettingOverrideMultiTenantMultiRegionAbstractionsAllowed -// corresponds to the allow-multi-region-abstractions-for-secondary-tenants -// directive. -type tenantClusterSettingOverrideMultiTenantMultiRegionAbstractionsAllowed struct{} - -var _ tenantClusterSettingOverrideOpt = &tenantClusterSettingOverrideMultiTenantMultiRegionAbstractionsAllowed{} - -func (t tenantClusterSettingOverrideMultiTenantMultiRegionAbstractionsAllowed) apply( - args *tenantClusterSettingOverrideArgs, -) { - args.overrideMultiTenantMultiRegionAbstractionsAllowed = true -} - -// tenantClusterSettingOverrideMultiTenantZoneConfigsAllowed corresponds to -// the allow-zone-configs-for-secondary-tenants directive. -type tenantClusterSettingOverrideMultiTenantZoneConfigsAllowed struct{} - -var _ tenantClusterSettingOverrideOpt = tenantClusterSettingOverrideMultiTenantZoneConfigsAllowed{} - -func (t tenantClusterSettingOverrideMultiTenantZoneConfigsAllowed) apply( - args *tenantClusterSettingOverrideArgs, -) { - args.overrideMultiTenantZoneConfigsAllowed = true -} - -// tenantClusterSettingOverrideMultiTenantSplitAtAllowed corresponds to -// the allow-split-at-for-secondary-tenants directive. -type tenantClusterSettingOverrideMultiTenantSplitAtAllowed struct{} - -var _ tenantClusterSettingOverrideOpt = tenantClusterSettingOverrideMultiTenantSplitAtAllowed{} - -func (t tenantClusterSettingOverrideMultiTenantSplitAtAllowed) apply( - args *tenantClusterSettingOverrideArgs, -) { - args.overrideMultiTenantSplitAtAllowed = true +// tenantOverrideArgs are the arguments used by the host cluster to configure +// tenant overrides (eg. cluster settings, capabilities) during setup. +type tenantOverrideArgs struct { + clusterSettings map[string]string } // clusterOpt is implemented by options for configuring the test cluster under @@ -2095,30 +1991,30 @@ func parseDirectiveOptions(t *testing.T, path string, directiveName string, f fu } } -// readTenantClusterSettingOverrideArgs looks around the beginning of the file +// readTenantOverrideArgs looks around the beginning of the file // for a line looking like: // # tenant-cluster-setting-override-opt: opt1 opt2 ... -// and parses that line into a set of tenantClusterSettingOverrideArgs that need +// and parses that line into a set of tenantOverrideArgs that need // to be overriden by the host cluster before the test begins. -func readTenantClusterSettingOverrideArgs( - t *testing.T, path string, -) []tenantClusterSettingOverrideOpt { +func readTenantOverrideArgs(t *testing.T, path string) tenantOverrideArgs { file, err := os.Open(path) require.NoError(t, err) defer file.Close() - var res []tenantClusterSettingOverrideOpt + res := tenantOverrideArgs{ + clusterSettings: make(map[string]string), + } parseDirectiveOptions(t, path, "tenant-cluster-setting-override-opt", func(opt string) { - switch opt { - case "allow-zone-configs-for-secondary-tenants": - res = append(res, tenantClusterSettingOverrideMultiTenantZoneConfigsAllowed{}) - case "allow-multi-region-abstractions-for-secondary-tenants": - res = append(res, tenantClusterSettingOverrideMultiTenantMultiRegionAbstractionsAllowed{}) - case "allow-split-at-for-secondary-tenants": - res = append(res, tenantClusterSettingOverrideMultiTenantSplitAtAllowed{}) - default: - t.Fatalf("unrecognized cluster option: %s", opt) + parts := strings.Split(opt, "=") + if len(parts) != 2 { + t.Fatalf("error parsing cluster setting %q must be in format name=value", opt) + } + name := parts[0] + _, ok := res.clusterSettings[name] + if ok { + t.Fatalf("cannot set cluster setting %q more than once", name) } + res.clusterSettings[name] = parts[1] }) return res } @@ -4174,7 +4070,7 @@ func RunLogicTest( } lt.setup( - config, serverArgsCopy, readClusterOptions(t, path), readKnobOptions(t, path), readTenantClusterSettingOverrideArgs(t, path), + config, serverArgsCopy, readClusterOptions(t, path), readKnobOptions(t, path), readTenantOverrideArgs(t, path), ) lt.runFile(path, config) diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_tenant_locality b/pkg/sql/logictest/testdata/logic_test/distsql_tenant_locality index 008b9fafd40a..4f21408ab4df 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_tenant_locality +++ b/pkg/sql/logictest/testdata/logic_test/distsql_tenant_locality @@ -1,5 +1,5 @@ # LogicTest: 3node-tenant-multiregion -# tenant-cluster-setting-override-opt: allow-split-at-for-secondary-tenants allow-zone-configs-for-secondary-tenants allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.split_at.allow_for_secondary_tenant.enabled=true sql.zone_configs.allow_for_secondary_tenant.enabled=true sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # Create a table on the secondary tenant. statement ok diff --git a/pkg/sql/logictest/testdata/logic_test/sql_keys b/pkg/sql/logictest/testdata/logic_test/sql_keys index c4c8d1dd8c8a..0d5a1ed6ccfc 100644 --- a/pkg/sql/logictest/testdata/logic_test/sql_keys +++ b/pkg/sql/logictest/testdata/logic_test/sql_keys @@ -1,5 +1,5 @@ # LogicTest: local 3node-tenant -# tenant-cluster-setting-override-opt: allow-split-at-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.split_at.allow_for_secondary_tenant.enabled=true # This test depends on table ID's being stable, so add new tests at the bottom # of the file. diff --git a/pkg/sql/logictest/testdata/logic_test/zone_config b/pkg/sql/logictest/testdata/logic_test/zone_config index 290899ca5e07..dd7598bb16fb 100644 --- a/pkg/sql/logictest/testdata/logic_test/zone_config +++ b/pkg/sql/logictest/testdata/logic_test/zone_config @@ -1,6 +1,6 @@ # As these tests are run for both the system tenant and secondary tenants, we # turn on the setting that gates setting zone configs for system tenants. -# tenant-cluster-setting-override-opt: allow-zone-configs-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true # Check that we can alter the default zone config. statement ok diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant index baf584d6bf8d..5abe3ca50d1c 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant @@ -1,5 +1,5 @@ # LogicTest: 3node-tenant -# tenant-cluster-setting-override-opt: allow-zone-configs-for-secondary-tenants allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true statement ok CREATE TABLE tbl1 (a INT PRIMARY KEY, b INT) diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant_locality b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant_locality index 835e766bca15..45a60377b6ff 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant_locality +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tenant_locality @@ -1,5 +1,5 @@ # LogicTest: 3node-tenant-multiregion -# tenant-cluster-setting-override-opt: allow-split-at-for-secondary-tenants allow-zone-configs-for-secondary-tenants allow-multi-region-abstractions-for-secondary-tenants +# tenant-cluster-setting-override-opt: sql.split_at.allow_for_secondary_tenant.enabled=true sql.zone_configs.allow_for_secondary_tenant.enabled=true sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true # Create a table on the secondary tenant. statement ok