Skip to content

Commit

Permalink
deprecate queryserver-enable-settings-pool flag (#16280)
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
Co-authored-by: Deepthi Sigireddi <[email protected]>
  • Loading branch information
harshit-gangal and deepthi authored Jun 28, 2024
1 parent 16b3826 commit 15fa9b4
Show file tree
Hide file tree
Showing 15 changed files with 264 additions and 1,607 deletions.
10 changes: 7 additions & 3 deletions changelog/21.0/21.0.0/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
### Table of Contents

- **[Major Changes](#major-changes)**
- **[Deletions](#deletions)**
- **[Deprecations and Deletions](#deprecations-and-deletions)**
- [Deletion of deprecated metrics](#metric-deletion)
- [VTTablet Flags](#vttablet-flags)
- **[Breaking changes](#breaking-changes)**

## <a id="major-changes"/>Major Changes

### <a id="deletions"/>Deletion
### <a id="deprecations-and-deletions"/>Deprecations and Deletions

#### <a id="metric-deletion"/>Deletion of deprecated metrics

Expand All @@ -31,6 +32,9 @@ The following metrics that were deprecated in the previous release, have now bee
| `emergency_reparent_counts` |
| `planned_reparent_counts` |
| `reparent_shard_operation_timings` |

#### <a id="vttablet-flags"/>VTTablet Flags

- `queryserver-enable-settings-pool` flag, added in v15, has been on by default since v17.
It is now deprecated and will be removed in a future release.

1 change: 0 additions & 1 deletion go/flags/endtoend/vtcombo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ Flags:
--queryserver-config-truncate-error-len int truncate errors sent to client if they are longer than this value (0 means do not truncate)
--queryserver-config-txpool-timeout duration query server transaction pool timeout, it is how long vttablet waits if tx pool is full (default 1s)
--queryserver-config-warn-result-size int query server result size warning threshold, warn if number of rows returned from vttablet for non-streaming queries exceeds this
--queryserver-enable-settings-pool Enable pooling of connections with modified system settings (default true)
--queryserver-enable-views Enable views support in vttablet.
--queryserver_enable_online_ddl Enable online DDL. (default true)
--redact-debug-ui-queries redact full queries and bind variables from debug UI
Expand Down
1 change: 0 additions & 1 deletion go/flags/endtoend/vttablet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ Flags:
--queryserver-config-truncate-error-len int truncate errors sent to client if they are longer than this value (0 means do not truncate)
--queryserver-config-txpool-timeout duration query server transaction pool timeout, it is how long vttablet waits if tx pool is full (default 1s)
--queryserver-config-warn-result-size int query server result size warning threshold, warn if number of rows returned from vttablet for non-streaming queries exceeds this
--queryserver-enable-settings-pool Enable pooling of connections with modified system settings (default true)
--queryserver-enable-views Enable views support in vttablet.
--queryserver_enable_online_ddl Enable online DDL. (default true)
--redact-debug-ui-queries redact full queries and bind variables from debug UI
Expand Down
2 changes: 0 additions & 2 deletions go/test/endtoend/reparent/prssettingspool/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ func TestMain(m *testing.M) {
Name: keyspaceName,
SchemaSQL: schemaSQL,
}
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs,
"--queryserver-enable-settings-pool")
err = clusterInstance.StartUnshardedKeyspace(*keyspace, 2, false)
if err != nil {
return 1
Expand Down
83 changes: 34 additions & 49 deletions go/test/endtoend/vtgate/reservedconn/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,61 +100,46 @@ CREATE TABLE test_vdx (
`
)

var enableSettingsPool bool

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

code := runAllTests(m)
if code != 0 {
os.Exit(code)
}
exitCode := func() int {
clusterInstance = cluster.NewCluster(cell, hostname)
defer clusterInstance.Teardown()

println("running with settings pool enabled")
// run again with settings pool enabled.
enableSettingsPool = true
code = runAllTests(m)
os.Exit(code)
}
// Start topo server
if err := clusterInstance.StartTopo(); err != nil {
return 1
}

func runAllTests(m *testing.M) int {
clusterInstance = cluster.NewCluster(cell, hostname)
defer clusterInstance.Teardown()

// Start topo server
if err := clusterInstance.StartTopo(); err != nil {
return 1
}

// Start keyspace
keyspace := &cluster.Keyspace{
Name: keyspaceName,
SchemaSQL: sqlSchema,
VSchema: vSchema,
}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-transaction-timeout", "5s"}
if enableSettingsPool {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-enable-settings-pool")
}
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, false); err != nil {
return 1
}

// Start vtgate
// This test requires setting the mysql_server_version vtgate flag
// to 5.7 regardless of the actual MySQL version used for the tests.
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s", "--mysql_server_version", "5.7.0"}
clusterInstance.VtGatePlannerVersion = querypb.ExecuteOptions_Gen4
if err := clusterInstance.StartVtgate(); err != nil {
return 1
}

vtParams = mysql.ConnParams{
Host: clusterInstance.Hostname,
Port: clusterInstance.VtgateMySQLPort,
}
return m.Run()
// Start keyspace
keyspace := &cluster.Keyspace{
Name: keyspaceName,
SchemaSQL: sqlSchema,
VSchema: vSchema,
}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-transaction-timeout", "5s"}
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, false); err != nil {
return 1
}

// Start vtgate
// This test requires setting the mysql_server_version vtgate flag
// to 5.7 regardless of the actual MySQL version used for the tests.
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s", "--mysql_server_version", "5.7.0"}
clusterInstance.VtGatePlannerVersion = querypb.ExecuteOptions_Gen4
if err := clusterInstance.StartVtgate(); err != nil {
return 1
}

vtParams = mysql.ConnParams{
Host: clusterInstance.Hostname,
Port: clusterInstance.VtgateMySQLPort,
}
return m.Run()
}()
os.Exit(exitCode)
}

func assertIsEmpty(t *testing.T, conn *mysql.Conn, query string) {
Expand Down
72 changes: 28 additions & 44 deletions go/test/endtoend/vtgate/reservedconn/reconnect1/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,58 +62,42 @@ var (
`
)

var enableSettingsPool bool

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

code := runAllTests(m)
if code != 0 {
os.Exit(code)
}

println("running with settings pool enabled")
// run again with settings pool enabled.
enableSettingsPool = true
code = runAllTests(m)
os.Exit(code)
}

func runAllTests(m *testing.M) int {
exitCode := func() int {
clusterInstance = cluster.NewCluster(cell, hostname)
defer clusterInstance.Teardown()

clusterInstance = cluster.NewCluster(cell, hostname)
defer clusterInstance.Teardown()

// Start topo server
if err := clusterInstance.StartTopo(); err != nil {
return 1
}
// Start topo server
if err := clusterInstance.StartTopo(); err != nil {
return 1
}

// Start keyspace
keyspace := &cluster.Keyspace{
Name: keyspaceName,
SchemaSQL: sqlSchema,
VSchema: vSchema,
}
if enableSettingsPool {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-enable-settings-pool")
}
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, true); err != nil {
return 1
}
// Start keyspace
keyspace := &cluster.Keyspace{
Name: keyspaceName,
SchemaSQL: sqlSchema,
VSchema: vSchema,
}
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, true); err != nil {
return 1
}

// Start vtgate
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s"}
if err := clusterInstance.StartVtgate(); err != nil {
return 1
}
// Start vtgate
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s"}
if err := clusterInstance.StartVtgate(); err != nil {
return 1
}

vtParams = mysql.ConnParams{
Host: clusterInstance.Hostname,
Port: clusterInstance.VtgateMySQLPort,
}
return m.Run()
vtParams = mysql.ConnParams{
Host: clusterInstance.Hostname,
Port: clusterInstance.VtgateMySQLPort,
}
return m.Run()
}()
os.Exit(exitCode)
}

func TestServingChange(t *testing.T) {
Expand Down
78 changes: 32 additions & 46 deletions go/test/endtoend/vtgate/reservedconn/reconnect2/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,58 +63,44 @@ var (
`
)

var enableSettingsPool bool

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

code := runAllTests(m)
if code != 0 {
os.Exit(code)
}
exitCode := func() int {
clusterInstance = cluster.NewCluster(cell, hostname)
defer clusterInstance.Teardown()

println("running with settings pool enabled")
// run again with settings pool enabled.
enableSettingsPool = true
code = runAllTests(m)
os.Exit(code)
}
// Start topo server
if err := clusterInstance.StartTopo(); err != nil {
return 1
}

// Start keyspace
keyspace := &cluster.Keyspace{
Name: keyspaceName,
SchemaSQL: sqlSchema,
VSchema: vSchema,
}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-transaction-timeout", "5s"}
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, true); err != nil {
return 1
}

// Start vtgate
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s"}
if err := clusterInstance.StartVtgate(); err != nil {
return 1
}

vtParams = mysql.ConnParams{
Host: clusterInstance.Hostname,
Port: clusterInstance.VtgateMySQLPort,
}
return m.Run()
}()
os.Exit(exitCode)

func runAllTests(m *testing.M) int {
clusterInstance = cluster.NewCluster(cell, hostname)
defer clusterInstance.Teardown()

// Start topo server
if err := clusterInstance.StartTopo(); err != nil {
return 1
}

// Start keyspace
keyspace := &cluster.Keyspace{
Name: keyspaceName,
SchemaSQL: sqlSchema,
VSchema: vSchema,
}
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-transaction-timeout", "5s"}
if enableSettingsPool {
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-enable-settings-pool")
}
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, true); err != nil {
return 1
}

// Start vtgate
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s"}
if err := clusterInstance.StartVtgate(); err != nil {
return 1
}

vtParams = mysql.ConnParams{
Host: clusterInstance.Hostname,
Port: clusterInstance.VtgateMySQLPort,
}
return m.Run()
}

func TestTabletChange(t *testing.T) {
Expand Down
Loading

0 comments on commit 15fa9b4

Please sign in to comment.