Skip to content

Commit

Permalink
remove queryserver-config-schema-change-signal-interval if binary ver…
Browse files Browse the repository at this point in the history
…sion >= 17

Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui committed Sep 29, 2023
1 parent aa92d9a commit 5663227
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 18 deletions.
5 changes: 4 additions & 1 deletion go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"time"

"vitess.io/vitess/go/mysql"
"vitess.io/vitess/go/test/endtoend/utils"
"vitess.io/vitess/go/vt/log"
"vitess.io/vitess/go/vt/schema"

Expand Down Expand Up @@ -154,9 +155,11 @@ 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",
}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
clusterInstance.VtGateExtraArgs = []string{
"--ddl_strategy", "online",
}
Expand Down
5 changes: 4 additions & 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,10 @@ 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"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
5 changes: 4 additions & 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,10 @@ 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"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
err = clusterInstance.StartKeyspace(*sKs, shardedKsShards, 0, false)
if err != nil {
return 1
Expand Down
5 changes: 4 additions & 1 deletion go/test/endtoend/vtgate/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ 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", "--queryserver-config-max-result-size", "100", "--queryserver-config-terse-errors"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-max-result-size", "100", "--queryserver-config-terse-errors"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
5 changes: 4 additions & 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,10 @@ 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"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
5 changes: 4 additions & 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,10 @@ 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"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
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 @@ -72,7 +72,10 @@ 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"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
5 changes: 4 additions & 1 deletion go/test/endtoend/vtgate/queries/lookup_queries/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ func TestMain(m *testing.M) {
VSchema: shardedVSchema,
}

clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
err = clusterInstance.StartKeyspace(*sKs, shardedKsShards, 0, false)
if err != nil {
return 1
Expand Down
5 changes: 4 additions & 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,10 @@ 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"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
5 changes: 4 additions & 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,10 @@ 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"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
err = clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 0, false)
if err != nil {
return 1
Expand Down
5 changes: 4 additions & 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,10 @@ 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"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
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 @@ -91,9 +91,9 @@ func TestMain(m *testing.M) {

// restart the tablet so that the schema.Engine gets a chance to start with existing schema
tablet := clusterInstance.Keyspaces[0].Shards[0].PrimaryTablet()
tablet.VttabletProcess.ExtraArgs = []string{
"--queryserver-config-schema-change-signal",
fmt.Sprintf("--queryserver-config-schema-change-signal-interval=%d", signalInterval),
tablet.VttabletProcess.ExtraArgs = []string{"--queryserver-config-schema-change-signal"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
tablet.VttabletProcess.ExtraArgs = append(tablet.VttabletProcess.ExtraArgs, fmt.Sprintf("--queryserver-config-schema-change-signal-interval=%d", signalInterval))
}
if err := tablet.RestartOnlyTablet(); err != nil {
return 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ func TestMain(m *testing.M) {
"--schema_change_signal_user", "userData1"}
clusterInstance.VtGatePlannerVersion = planbuilder.Gen4
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal",
"--queryserver-config-schema-change-signal-interval", "0.1",
"--queryserver-config-strict-table-acl",
"--queryserver-config-acl-exempt-acl", "userData1",
"--table-acl-config", "dummy.json"}

if vttabletVer <= 16 {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
if vtgateVer >= 16 && vttabletVer >= 16 {
clusterInstance.VtGateExtraArgs = append(clusterInstance.VtGateExtraArgs, "--enable-views")
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-enable-views")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ func TestMain(m *testing.M) {
}

clusterInstance.VtGateExtraArgs = []string{"--schema_change_signal", "--schema_change_signal_user", "userData1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "5", "--queryserver-config-strict-table-acl", "--queryserver-config-acl-exempt-acl", "userData1", "--table-acl-config", "dummy.json"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-strict-table-acl", "--queryserver-config-acl-exempt-acl", "userData1", "--table-acl-config", "dummy.json"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "5")
}

// Start topo server
err = clusterInstance.StartTopo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import (

"github.com/stretchr/testify/require"

"vitess.io/vitess/go/test/endtoend/utils"

"vitess.io/vitess/go/mysql"
"vitess.io/vitess/go/test/endtoend/cluster"
)
Expand Down Expand Up @@ -69,10 +71,12 @@ func TestMain(m *testing.M) {
clusterInstance.VtGateExtraArgs = append(clusterInstance.VtGateExtraArgs, "--schema_change_signal")
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs,
"--queryserver-config-schema-change-signal",
"--queryserver-config-schema-change-signal-interval", "0.1",
"--queryserver-config-strict-table-acl",
"--queryserver-config-acl-exempt-acl", "userData1",
"--table-acl-config", "dummy.json")
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
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 @@ -83,7 +83,10 @@ func TestMain(m *testing.M) {
SchemaSQL: sqlSchema,
SidecarDBName: sidecarDBName,
}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal", "--queryserver-config-schema-change-signal-interval", "0.1"}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-schema-change-signal"}
if !utils.BinaryIsAtVersion(17, "vttablet") {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-config-schema-change-signal-interval", "0.1")
}
err = clusterInstance.StartUnshardedKeyspace(*keyspace, 0, false)
if err != nil {
return 1
Expand Down

0 comments on commit 5663227

Please sign in to comment.