Skip to content

Commit

Permalink
Remove deprecated flags before v18.0.0 (#14071)
Browse files Browse the repository at this point in the history
Co-authored-by: Deepthi Sigireddi <[email protected]>
  • Loading branch information
frouioui and deepthi authored Sep 28, 2023
1 parent fd9b7d6 commit 9991dad
Show file tree
Hide file tree
Showing 39 changed files with 1,669 additions and 1,831 deletions.
33 changes: 33 additions & 0 deletions changelog/18.0/18.0.0/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [Updated to node v18.16.0](#update-node)
- **[Deprecations and Deletions](#deprecations-and-deletions)**
- [Deprecated Flags](#deprecated-flags)
- [Deleted Flags](#deleted-flags)
- [Deprecated Stats](#deprecated-stats)
- [Deleted `V3` planner](#deleted-v3)
- [Deleted `k8stopo`](#deleted-k8stopo)
Expand Down Expand Up @@ -118,6 +119,38 @@ VTGate flag:

- `--schema_change_signal_user` is deprecated and will be removed in `v19.0`

#### <a id="deleted-flags"/>Deleted Command Line Flags

Flags in `vtcombo`:
- `--vtctld_addr`

Flags in `vtctldclient ApplySchema`:
- `--skip-preflight`

Flags in `vtctl ApplySchema`:
- `--skip_preflight`

Flags in `vtgate`:
- `--vtctld_addr`

Flags in `vttablet`:
- `--vtctld_addr`
- `--use_super_read_only`
- `--disable-replication-manager`
- `--init_populate_metadata`
- `--queryserver-config-pool-prefill-parallelism`
- `--queryserver-config-stream-pool-prefill-parallelism`
- `--queryserver-config-transaction-pool-prefill-parallelism`
- `--queryserver-config-schema-change-signal-interval`

Flags in `vtctld`:
- `--vtctld_show_topology_crud`
- `--durability_policy`

Flags in `vtorc`:
- `--lock-shard-timeout`
- `--orc_web_dir`

#### <a id="deprecated-stats"/>Deprecated Stats

The following Emergency Reparent Shard stats are deprecated in `v18.0` and will be removed in `v19.0`:
Expand Down
1 change: 0 additions & 1 deletion docker/mini/vttablet-mini-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ vttablet \
-mycnf_mysql_port $mysql_port \
-service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' \
-pid_file $VTDATAROOT/$tablet_dir/vttablet.pid \
-vtctld_addr http://$hostname:$vtctld_web_port/ \
> $VTDATAROOT/$tablet_dir/vttablet.out 2>&1 &

# Block waiting for the tablet to be listening
Expand Down
1 change: 0 additions & 1 deletion examples/common/scripts/vttablet-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ vttablet \
--grpc_port $grpc_port \
--service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' \
--pid_file $VTDATAROOT/$tablet_dir/vttablet.pid \
--vtctld_addr http://$hostname:$vtctld_web_port/ \
--heartbeat_enable \
--heartbeat_interval=250ms \
--heartbeat_on_demand_duration=5s \
Expand Down
1 change: 0 additions & 1 deletion examples/compose/vttablet-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ exec $VTROOT/bin/vttablet \
--port $web_port \
--grpc_port $grpc_port \
--service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' \
--vtctld_addr "http://vtctld:$WEB_PORT/" \
--init_keyspace $keyspace \
--init_shard $shard \
--backup_storage_implementation file \
Expand Down
2 changes: 0 additions & 2 deletions go/cmd/vtcombo/cli/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import (
"vitess.io/vitess/go/vt/servenv"
"vitess.io/vitess/go/vt/srvtopo"
"vitess.io/vitess/go/vt/vtgate"

_ "vitess.io/vitess/go/vt/status"
)

func addStatusParts(vtg *vtgate.VTGate) {
Expand Down
3 changes: 0 additions & 3 deletions go/cmd/vtctldclient/command/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ func commandApplySchema(cmd *cobra.Command, args []string) error {
Keyspace: ks,
DdlStrategy: applySchemaOptions.DDLStrategy,
Sql: parts,
SkipPreflight: true,
UuidList: applySchemaOptions.UUIDList,
MigrationContext: applySchemaOptions.MigrationContext,
WaitReplicasTimeout: protoutil.DurationToProto(applySchemaOptions.WaitReplicasTimeout),
Expand Down Expand Up @@ -289,8 +288,6 @@ func commandReloadSchemaShard(cmd *cobra.Command, args []string) error {
func init() {
ApplySchema.Flags().Bool("allow-long-unavailability", false, "Deprecated and has no effect.")
ApplySchema.Flags().MarkDeprecated("--allow-long-unavailability", "")
ApplySchema.Flags().Bool("skip-preflight", false, "Deprecated and has no effect.")
ApplySchema.Flags().MarkDeprecated("--skip-preflight", "Deprecated. Assumed to be always 'true'")
ApplySchema.Flags().StringVar(&applySchemaOptions.DDLStrategy, "ddl-strategy", string(schema.DDLStrategyDirect), "Online DDL strategy, compatible with @@ddl_strategy session variable (examples: 'gh-ost', 'pt-osc', 'gh-ost --max-load=Threads_running=100'.")
ApplySchema.Flags().StringSliceVar(&applySchemaOptions.UUIDList, "uuid", nil, "Optional, comma-delimited, repeatable, explicit UUIDs for migration. If given, must match number of DDL changes.")
ApplySchema.Flags().StringVar(&applySchemaOptions.MigrationContext, "migration-context", "", "For Online DDL, optionally supply a custom unique string used as context for the migration(s) in this command. By default a unique context is auto-generated by Vitess.")
Expand Down
1 change: 0 additions & 1 deletion go/cmd/vtgate/cli/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"vitess.io/vitess/go/vt/discovery"
"vitess.io/vitess/go/vt/servenv"
"vitess.io/vitess/go/vt/srvtopo"
_ "vitess.io/vitess/go/vt/status"
"vitess.io/vitess/go/vt/vtgate"
)

Expand Down
1 change: 0 additions & 1 deletion go/cmd/vtorc/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func init() {
servenv.MoveFlagsToCobraCommand(Main)

logic.RegisterFlags(Main.Flags())
server.RegisterFlags(Main.Flags())
config.RegisterFlags(Main.Flags())
acl.RegisterFlags(Main.Flags())
Main.Flags().StringVar(&configFile, "config", "", "config file name")
Expand Down
1 change: 0 additions & 1 deletion go/cmd/vttablet/cli/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package cli

import (
"vitess.io/vitess/go/vt/servenv"
_ "vitess.io/vitess/go/vt/status"
"vitess.io/vitess/go/vt/topo"
"vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication"
"vitess.io/vitess/go/vt/vttablet/tabletserver"
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/cluster/vtorc_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ func (orc *VTOrcProcess) Setup() (err error) {
"--instance-poll-time", "1s",
// Faster topo information refresh speeds up the tests. This doesn't add any significant load either
"--topo-information-refresh-duration", "3s",
"--orc_web_dir", path.Join(os.Getenv("VTROOT"), "web", "vtorc"),
)
if *isCoverage {
orc.proc.Args = append(orc.proc.Args, "--test.coverprofile="+getCoveragePath("orc.out"))
Expand Down
2 changes: 0 additions & 2 deletions go/test/endtoend/cluster/vttablet_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ func (vttablet *VttabletProcess) Setup() (err error) {
"--backup_storage_implementation", vttablet.BackupStorageImplementation,
"--file_backup_storage_root", vttablet.FileBackupStorageRoot,
"--service_map", vttablet.ServiceMap,
"--vtctld_addr", vttablet.VtctldAddress,
"--vtctld_addr", vttablet.VtctldAddress,
"--vreplication_tablet_type", vttablet.VreplicationTabletType,
"--db_charset", vttablet.Charset,
)
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ func TestMain(m *testing.M) {
"--heartbeat_interval", "250ms",
"--heartbeat_on_demand_duration", "5s",
"--migration_check_interval", "5s",
"--queryserver-config-schema-change-signal-interval", "0.1",
"--watch_replication_stream",
// The next flags are deprecated, and we incldue them to verify that they are nonetheless still allowed.
// The values are irrelevant. Just the fact that the flags are allowed in what's important.
Expand Down
16 changes: 5 additions & 11 deletions go/test/endtoend/reparent/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var (
replicationWaitTimeout = time.Duration(15 * time.Second)
)

//region cluster setup/teardown
// region cluster setup/teardown

// SetupReparentCluster is used to setup the reparent cluster
func SetupReparentCluster(t *testing.T, durability string) *cluster.LocalProcessCluster {
Expand Down Expand Up @@ -137,19 +137,13 @@ func setupCluster(ctx context.Context, t *testing.T, shardName string, cells []s
// In this case, the close method and initSchema method of the onlineDDL executor race.
// If the initSchema acquires the lock, then it takes about 30 seconds for it to run during which time the
// DemotePrimary rpc is stalled!
"--queryserver_enable_online_ddl=false",
// disabling active reparents on the tablet since we don't want the replication manager
// to fix replication if it is stopped. Some tests deliberately do that. Also, we don't want
// the replication manager to silently fix the replication in case ERS or PRS mess up. All the
// tests in this test suite should work irrespective of this flag. Each run of ERS, PRS should be
// setting up the replication correctly.
"--disable-replication-manager")
"--queryserver_enable_online_ddl=false")

// Initialize Cluster
err = clusterInstance.SetupCluster(keyspace, []cluster.Shard{*shard})
require.NoError(t, err, "Cannot launch cluster")

//Start MySql
// Start MySql
var mysqlCtlProcessList []*exec.Cmd
for _, shard := range clusterInstance.Keyspaces[0].Shards {
for _, tablet := range shard.Vttablets {
Expand Down Expand Up @@ -252,7 +246,7 @@ func StartNewVTTablet(t *testing.T, clusterInstance *cluster.LocalProcessCluster
return tablet
}

//endregion
// endregion

// region database queries
func getMysqlConnParam(tablet *cluster.Vttablet) mysql.ConnParams {
Expand Down Expand Up @@ -280,7 +274,7 @@ func execute(t *testing.T, conn *mysql.Conn, query string) *sqltypes.Result {
return qr
}

//endregion
// endregion

// region ers, prs

Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/utils/mysqlvsvitess/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestMain(m *testing.M) {
VSchema: vschema,
}
clusterInstance.VtGateExtraArgs = []string{"--schema_change_signal"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/vtgate/gen4/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestMain(m *testing.M) {
}

clusterInstance.VtGateExtraArgs = []string{"--schema_change_signal"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
err = clusterInstance.StartKeyspace(*sKs, shardedKsShards, 0, false)
if err != nil {
return 1
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/vtgate/queries/aggregation/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestMain(m *testing.M) {
VSchema: vschema,
}
clusterInstance.VtGateExtraArgs = []string{"--schema_change_signal"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/vtgate/queries/foundrows/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestMain(m *testing.M) {
VSchema: vschema,
}
clusterInstance.VtGateExtraArgs = []string{"--schema_change_signal"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func TestMain(m *testing.M) {
VSchema: shardedVSchema,
}

clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal-interval", "0.1"}
err = clusterInstance.StartKeyspace(*sKs, shardedKsShards, 0, false)
if err != nil {
return 1
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/vtgate/queries/orderby/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestMain(m *testing.M) {
VSchema: vschema,
}
clusterInstance.VtGateExtraArgs = []string{"--schema_change_signal"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/vtgate/queries/random/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestMain(m *testing.M) {
VSchema: vschema,
}
clusterInstance.VtGateExtraArgs = []string{"--schema_change_signal"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/vtgate/queries/subquery/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestMain(m *testing.M) {
VSchema: VSchema,
}
clusterInstance.VtGateExtraArgs = []string{"--schema_change_signal"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/vtgate/queries/union/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func TestMain(m *testing.M) {
VSchema: vschema,
}
clusterInstance.VtGateExtraArgs = []string{"--schema_change_signal"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
Loading

0 comments on commit 9991dad

Please sign in to comment.