Skip to content

Commit

Permalink
Remove removed flags from being used for v16+ binaries (#12128)
Browse files Browse the repository at this point in the history
* feat: remove enable_semi_sync and workflow flags from v16+

Signed-off-by: Manan Gupta <manan@planetscale.com>

* test: also fix test for ers initialization

Signed-off-by: Manan Gupta <manan@planetscale.com>

* tests: remove workflow manager flags entirely

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
  • Loading branch information
GuptaManan100 authored Jan 25, 2023
1 parent e259218 commit 04dbcf7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
3 changes: 1 addition & 2 deletions go/test/endtoend/cluster/vtctld_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@ func (vtctld *VtctldProcess) Setup(cell string, extraArgs ...string) (err error)
"--topo_global_server_address", vtctld.CommonArg.TopoGlobalAddress,
"--topo_global_root", vtctld.CommonArg.TopoGlobalRoot,
"--cell", cell,
"--workflow_manager_init",
"--workflow_manager_use_election",
"--service_map", vtctld.ServiceMap,
"--backup_storage_implementation", vtctld.BackupStorageImplementation,
"--file_backup_storage_root", vtctld.FileBackupStorageRoot,
"--log_dir", vtctld.LogDir,
"--port", fmt.Sprintf("%d", vtctld.Port),
"--grpc_port", fmt.Sprintf("%d", vtctld.GrpcPort),
)

if *isCoverage {
vtctld.proc.Args = append(vtctld.proc.Args, "--test.coverprofile="+getCoveragePath("vtctld.out"))
}
Expand Down
10 changes: 9 additions & 1 deletion go/test/endtoend/cluster/vttablet_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,15 @@ func (vttablet *VttabletProcess) Setup() (err error) {
vttablet.proc.Args = append(vttablet.proc.Args, "--restore_from_backup")
}
if vttablet.EnableSemiSync {
vttablet.proc.Args = append(vttablet.proc.Args, "--enable_semi_sync")
var majorVersion int
majorVersion, err = GetMajorVersion("vttablet")
if err != nil {
return err
}
// enable_semi_sync is removed in v16 and shouldn't be set on any release v16+
if majorVersion <= 15 {
vttablet.proc.Args = append(vttablet.proc.Args, "--enable_semi_sync")
}
}
if vttablet.DbFlavor != "" {
vttablet.proc.Args = append(vttablet.proc.Args, fmt.Sprintf("--db_flavor=%s", vttablet.DbFlavor))
Expand Down
4 changes: 3 additions & 1 deletion go/test/endtoend/reparent/emergencyreparent/ers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,12 @@ func TestERSForInitialization(t *testing.T) {
shard.Vttablets = tablets
clusterInstance.VtTabletExtraArgs = []string{
"--lock_tables_timeout", "5s",
"--enable_semi_sync",
"--init_populate_metadata",
"--track_schema_versions=true",
}
if clusterInstance.VtTabletMajorVersion <= 15 {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--enable_semi_sync")
}

// Initialize Cluster
err = clusterInstance.SetupCluster(keyspace, []cluster.Shard{*shard})
Expand Down
3 changes: 2 additions & 1 deletion go/test/endtoend/reparent/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func setupCluster(ctx context.Context, t *testing.T, shardName string, cells []s
clusterInstance := cluster.NewCluster(cells[0], Hostname)
keyspace := &cluster.Keyspace{Name: KeyspaceName}

if durability == "semi_sync" {
// enable_semi_sync is removed in v16 and shouldn't be set on any release v16+
if durability == "semi_sync" && clusterInstance.VtTabletMajorVersion <= 15 {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--enable_semi_sync")
}

Expand Down

0 comments on commit 04dbcf7

Please sign in to comment.