Skip to content

Commit

Permalink
sql: remove super regions version and gates
Browse files Browse the repository at this point in the history
Release justification: Only removing old version.
Release note: None
  • Loading branch information
RichardJCai committed Aug 17, 2022
1 parent 3b84166 commit 70e6813
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 172 deletions.
3 changes: 0 additions & 3 deletions pkg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ ALL_TESTS = [
"//pkg/sql/logictest/tests/fakedist-disk:fakedist-disk_test",
"//pkg/sql/logictest/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/sql/logictest/tests/fakedist:fakedist_test",
"//pkg/sql/logictest/tests/local-mixed-21.2-22.1:local-mixed-21_2-22_1_test",
"//pkg/sql/logictest/tests/local-mixed-22.1-22.2:local-mixed-22_1-22_2_test",
"//pkg/sql/logictest/tests/local-udf:local-udf_test",
"//pkg/sql/logictest/tests/local-v1.1-at-v1.0-noupgrade:local-v1_1-at-v1_0-noupgrade_test",
Expand Down Expand Up @@ -1448,7 +1447,6 @@ GO_TARGETS = [
"//pkg/sql/logictest/tests/fakedist-disk:fakedist-disk_test",
"//pkg/sql/logictest/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/sql/logictest/tests/fakedist:fakedist_test",
"//pkg/sql/logictest/tests/local-mixed-21.2-22.1:local-mixed-21_2-22_1_test",
"//pkg/sql/logictest/tests/local-mixed-22.1-22.2:local-mixed-22_1-22_2_test",
"//pkg/sql/logictest/tests/local-udf:local-udf_test",
"//pkg/sql/logictest/tests/local-v1.1-at-v1.0-noupgrade:local-v1_1-at-v1_0-noupgrade_test",
Expand Down Expand Up @@ -2563,7 +2561,6 @@ GET_X_DATA_TARGETS = [
"//pkg/sql/logictest/tests/fakedist-disk:get_x_data",
"//pkg/sql/logictest/tests/fakedist-vec-off:get_x_data",
"//pkg/sql/logictest/tests/local:get_x_data",
"//pkg/sql/logictest/tests/local-mixed-21.2-22.1:get_x_data",
"//pkg/sql/logictest/tests/local-mixed-22.1-22.2:get_x_data",
"//pkg/sql/logictest/tests/local-udf:get_x_data",
"//pkg/sql/logictest/tests/local-v1.1-at-v1.0-noupgrade:get_x_data",
Expand Down
6 changes: 0 additions & 6 deletions pkg/clusterversion/cockroach_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ const (
// AutoStatsTableSettings is the version where we allow auto stats related
// table settings.
AutoStatsTableSettings
// SuperRegions enables the usage on super regions.
SuperRegions
// EnableNewChangefeedOptions enables the usage of new changefeed options
// such as end_time, initial_scan_only, and setting the value of initial_scan
// to 'yes|no|only'
Expand Down Expand Up @@ -406,10 +404,6 @@ var versionsSingleton = keyedVersions{
Key: AutoStatsTableSettings,
Version: roachpb.Version{Major: 21, Minor: 2, Internal: 100},
},
{
Key: SuperRegions,
Version: roachpb.Version{Major: 21, Minor: 2, Internal: 104},
},
{
Key: EnableNewChangefeedOptions,
Version: roachpb.Version{Major: 21, Minor: 2, Internal: 106},
Expand Down
67 changes: 33 additions & 34 deletions pkg/clusterversion/key_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions pkg/sql/alter_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"sort"
"strings"

"github.com/cockroachdb/cockroach/pkg/clusterversion"
"github.com/cockroachdb/cockroach/pkg/config/zonepb"
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/security/username"
Expand Down Expand Up @@ -1330,9 +1329,6 @@ type alterDatabaseAddSuperRegion struct {
func (p *planner) AlterDatabaseAddSuperRegion(
ctx context.Context, n *tree.AlterDatabaseAddSuperRegion,
) (planNode, error) {
if !p.ExecCfg().Settings.Version.IsActive(ctx, clusterversion.SuperRegions) {
return nil, errors.Newf("super regions are not supported until upgrade to version %s is finalized", clusterversion.SuperRegions.String())
}
if err := p.isSuperRegionEnabled(); err != nil {
return nil, err
}
Expand Down Expand Up @@ -1429,10 +1425,6 @@ type alterDatabaseDropSuperRegion struct {
func (p *planner) AlterDatabaseDropSuperRegion(
ctx context.Context, n *tree.AlterDatabaseDropSuperRegion,
) (planNode, error) {
if !p.ExecCfg().Settings.Version.IsActive(ctx, clusterversion.SuperRegions) {
return nil, errors.Newf("super regions are not supported until upgrade to version %s is finalized", clusterversion.SuperRegions.String())
}

if err := p.isSuperRegionEnabled(); err != nil {
return nil, err
}
Expand Down Expand Up @@ -1561,9 +1553,6 @@ func (n *alterDatabaseAlterSuperRegion) Close(context.Context) {}
func (p *planner) AlterDatabaseAlterSuperRegion(
ctx context.Context, n *tree.AlterDatabaseAlterSuperRegion,
) (planNode, error) {
if !p.ExecCfg().Settings.Version.IsActive(ctx, clusterversion.SuperRegions) {
return nil, errors.Newf("super regions are not supported until upgrade to version %s is finalized", clusterversion.SuperRegions.String())
}
if err := p.isSuperRegionEnabled(); err != nil {
return nil, err
}
Expand Down
10 changes: 0 additions & 10 deletions pkg/sql/logictest/testdata/logic_test/super_regions_mixed_version

This file was deleted.

28 changes: 0 additions & 28 deletions pkg/sql/logictest/tests/local-mixed-21.2-22.1/BUILD.bazel

This file was deleted.

80 changes: 0 additions & 80 deletions pkg/sql/logictest/tests/local-mixed-21.2-22.1/generated_test.go

This file was deleted.

0 comments on commit 70e6813

Please sign in to comment.