Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove removed flags from being used for v16+ binaries #12128

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions go/test/endtoend/cluster/vtctld_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,25 @@ 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),
)
var majorVersion int
majorVersion, err = GetMajorVersion("vtctld")
if err != nil {
return err
}
// workflow_manager_init and workflow_manager_use_election are removed in v16 and shouldn't be set on any release v16+
if majorVersion <= 15 {
vtctld.proc.Args = append(vtctld.proc.Args,
"--workflow_manager_init",
"--workflow_manager_use_election")
}

GuptaManan100 marked this conversation as resolved.
Show resolved Hide resolved
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