Skip to content

Commit 15fa9b4

Browse files
deprecate queryserver-enable-settings-pool flag (#16280)
Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: Deepthi Sigireddi <[email protected]>
1 parent 16b3826 commit 15fa9b4

File tree

15 files changed

+264
-1607
lines changed

15 files changed

+264
-1607
lines changed

changelog/21.0/21.0.0/summary.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
### Table of Contents
55

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

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

13-
### <a id="deletions"/>Deletion
14+
### <a id="deprecations-and-deletions"/>Deprecations and Deletions
1415

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

@@ -31,6 +32,9 @@ The following metrics that were deprecated in the previous release, have now bee
3132
| `emergency_reparent_counts` |
3233
| `planned_reparent_counts` |
3334
| `reparent_shard_operation_timings` |
34-
3535

36+
#### <a id="vttablet-flags"/>VTTablet Flags
37+
38+
- `queryserver-enable-settings-pool` flag, added in v15, has been on by default since v17.
39+
It is now deprecated and will be removed in a future release.
3640

go/flags/endtoend/vtcombo.txt

-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ Flags:
298298
--queryserver-config-truncate-error-len int truncate errors sent to client if they are longer than this value (0 means do not truncate)
299299
--queryserver-config-txpool-timeout duration query server transaction pool timeout, it is how long vttablet waits if tx pool is full (default 1s)
300300
--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
301-
--queryserver-enable-settings-pool Enable pooling of connections with modified system settings (default true)
302301
--queryserver-enable-views Enable views support in vttablet.
303302
--queryserver_enable_online_ddl Enable online DDL. (default true)
304303
--redact-debug-ui-queries redact full queries and bind variables from debug UI

go/flags/endtoend/vttablet.txt

-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ Flags:
289289
--queryserver-config-truncate-error-len int truncate errors sent to client if they are longer than this value (0 means do not truncate)
290290
--queryserver-config-txpool-timeout duration query server transaction pool timeout, it is how long vttablet waits if tx pool is full (default 1s)
291291
--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
292-
--queryserver-enable-settings-pool Enable pooling of connections with modified system settings (default true)
293292
--queryserver-enable-views Enable views support in vttablet.
294293
--queryserver_enable_online_ddl Enable online DDL. (default true)
295294
--redact-debug-ui-queries redact full queries and bind variables from debug UI

go/test/endtoend/reparent/prssettingspool/main_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ func TestMain(m *testing.M) {
6161
Name: keyspaceName,
6262
SchemaSQL: schemaSQL,
6363
}
64-
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs,
65-
"--queryserver-enable-settings-pool")
6664
err = clusterInstance.StartUnshardedKeyspace(*keyspace, 2, false)
6765
if err != nil {
6866
return 1

go/test/endtoend/vtgate/reservedconn/main_test.go

+34-49
Original file line numberDiff line numberDiff line change
@@ -100,61 +100,46 @@ CREATE TABLE test_vdx (
100100
`
101101
)
102102

103-
var enableSettingsPool bool
104-
105103
func TestMain(m *testing.M) {
106104
defer cluster.PanicHandler(nil)
107105
flag.Parse()
108106

109-
code := runAllTests(m)
110-
if code != 0 {
111-
os.Exit(code)
112-
}
107+
exitCode := func() int {
108+
clusterInstance = cluster.NewCluster(cell, hostname)
109+
defer clusterInstance.Teardown()
113110

114-
println("running with settings pool enabled")
115-
// run again with settings pool enabled.
116-
enableSettingsPool = true
117-
code = runAllTests(m)
118-
os.Exit(code)
119-
}
111+
// Start topo server
112+
if err := clusterInstance.StartTopo(); err != nil {
113+
return 1
114+
}
120115

121-
func runAllTests(m *testing.M) int {
122-
clusterInstance = cluster.NewCluster(cell, hostname)
123-
defer clusterInstance.Teardown()
124-
125-
// Start topo server
126-
if err := clusterInstance.StartTopo(); err != nil {
127-
return 1
128-
}
129-
130-
// Start keyspace
131-
keyspace := &cluster.Keyspace{
132-
Name: keyspaceName,
133-
SchemaSQL: sqlSchema,
134-
VSchema: vSchema,
135-
}
136-
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-transaction-timeout", "5s"}
137-
if enableSettingsPool {
138-
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-enable-settings-pool")
139-
}
140-
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, false); err != nil {
141-
return 1
142-
}
143-
144-
// Start vtgate
145-
// This test requires setting the mysql_server_version vtgate flag
146-
// to 5.7 regardless of the actual MySQL version used for the tests.
147-
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s", "--mysql_server_version", "5.7.0"}
148-
clusterInstance.VtGatePlannerVersion = querypb.ExecuteOptions_Gen4
149-
if err := clusterInstance.StartVtgate(); err != nil {
150-
return 1
151-
}
152-
153-
vtParams = mysql.ConnParams{
154-
Host: clusterInstance.Hostname,
155-
Port: clusterInstance.VtgateMySQLPort,
156-
}
157-
return m.Run()
116+
// Start keyspace
117+
keyspace := &cluster.Keyspace{
118+
Name: keyspaceName,
119+
SchemaSQL: sqlSchema,
120+
VSchema: vSchema,
121+
}
122+
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-transaction-timeout", "5s"}
123+
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, false); err != nil {
124+
return 1
125+
}
126+
127+
// Start vtgate
128+
// This test requires setting the mysql_server_version vtgate flag
129+
// to 5.7 regardless of the actual MySQL version used for the tests.
130+
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s", "--mysql_server_version", "5.7.0"}
131+
clusterInstance.VtGatePlannerVersion = querypb.ExecuteOptions_Gen4
132+
if err := clusterInstance.StartVtgate(); err != nil {
133+
return 1
134+
}
135+
136+
vtParams = mysql.ConnParams{
137+
Host: clusterInstance.Hostname,
138+
Port: clusterInstance.VtgateMySQLPort,
139+
}
140+
return m.Run()
141+
}()
142+
os.Exit(exitCode)
158143
}
159144

160145
func assertIsEmpty(t *testing.T, conn *mysql.Conn, query string) {

go/test/endtoend/vtgate/reservedconn/reconnect1/main_test.go

+28-44
Original file line numberDiff line numberDiff line change
@@ -62,58 +62,42 @@ var (
6262
`
6363
)
6464

65-
var enableSettingsPool bool
66-
6765
func TestMain(m *testing.M) {
6866
defer cluster.PanicHandler(nil)
6967
flag.Parse()
7068

71-
code := runAllTests(m)
72-
if code != 0 {
73-
os.Exit(code)
74-
}
75-
76-
println("running with settings pool enabled")
77-
// run again with settings pool enabled.
78-
enableSettingsPool = true
79-
code = runAllTests(m)
80-
os.Exit(code)
81-
}
82-
83-
func runAllTests(m *testing.M) int {
69+
exitCode := func() int {
70+
clusterInstance = cluster.NewCluster(cell, hostname)
71+
defer clusterInstance.Teardown()
8472

85-
clusterInstance = cluster.NewCluster(cell, hostname)
86-
defer clusterInstance.Teardown()
87-
88-
// Start topo server
89-
if err := clusterInstance.StartTopo(); err != nil {
90-
return 1
91-
}
73+
// Start topo server
74+
if err := clusterInstance.StartTopo(); err != nil {
75+
return 1
76+
}
9277

93-
// Start keyspace
94-
keyspace := &cluster.Keyspace{
95-
Name: keyspaceName,
96-
SchemaSQL: sqlSchema,
97-
VSchema: vSchema,
98-
}
99-
if enableSettingsPool {
100-
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-enable-settings-pool")
101-
}
102-
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, true); err != nil {
103-
return 1
104-
}
78+
// Start keyspace
79+
keyspace := &cluster.Keyspace{
80+
Name: keyspaceName,
81+
SchemaSQL: sqlSchema,
82+
VSchema: vSchema,
83+
}
84+
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, true); err != nil {
85+
return 1
86+
}
10587

106-
// Start vtgate
107-
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s"}
108-
if err := clusterInstance.StartVtgate(); err != nil {
109-
return 1
110-
}
88+
// Start vtgate
89+
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s"}
90+
if err := clusterInstance.StartVtgate(); err != nil {
91+
return 1
92+
}
11193

112-
vtParams = mysql.ConnParams{
113-
Host: clusterInstance.Hostname,
114-
Port: clusterInstance.VtgateMySQLPort,
115-
}
116-
return m.Run()
94+
vtParams = mysql.ConnParams{
95+
Host: clusterInstance.Hostname,
96+
Port: clusterInstance.VtgateMySQLPort,
97+
}
98+
return m.Run()
99+
}()
100+
os.Exit(exitCode)
117101
}
118102

119103
func TestServingChange(t *testing.T) {

go/test/endtoend/vtgate/reservedconn/reconnect2/main_test.go

+32-46
Original file line numberDiff line numberDiff line change
@@ -63,58 +63,44 @@ var (
6363
`
6464
)
6565

66-
var enableSettingsPool bool
67-
6866
func TestMain(m *testing.M) {
6967
defer cluster.PanicHandler(nil)
7068
flag.Parse()
7169

72-
code := runAllTests(m)
73-
if code != 0 {
74-
os.Exit(code)
75-
}
70+
exitCode := func() int {
71+
clusterInstance = cluster.NewCluster(cell, hostname)
72+
defer clusterInstance.Teardown()
7673

77-
println("running with settings pool enabled")
78-
// run again with settings pool enabled.
79-
enableSettingsPool = true
80-
code = runAllTests(m)
81-
os.Exit(code)
82-
}
74+
// Start topo server
75+
if err := clusterInstance.StartTopo(); err != nil {
76+
return 1
77+
}
78+
79+
// Start keyspace
80+
keyspace := &cluster.Keyspace{
81+
Name: keyspaceName,
82+
SchemaSQL: sqlSchema,
83+
VSchema: vSchema,
84+
}
85+
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-transaction-timeout", "5s"}
86+
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, true); err != nil {
87+
return 1
88+
}
89+
90+
// Start vtgate
91+
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s"}
92+
if err := clusterInstance.StartVtgate(); err != nil {
93+
return 1
94+
}
95+
96+
vtParams = mysql.ConnParams{
97+
Host: clusterInstance.Hostname,
98+
Port: clusterInstance.VtgateMySQLPort,
99+
}
100+
return m.Run()
101+
}()
102+
os.Exit(exitCode)
83103

84-
func runAllTests(m *testing.M) int {
85-
clusterInstance = cluster.NewCluster(cell, hostname)
86-
defer clusterInstance.Teardown()
87-
88-
// Start topo server
89-
if err := clusterInstance.StartTopo(); err != nil {
90-
return 1
91-
}
92-
93-
// Start keyspace
94-
keyspace := &cluster.Keyspace{
95-
Name: keyspaceName,
96-
SchemaSQL: sqlSchema,
97-
VSchema: vSchema,
98-
}
99-
clusterInstance.VtTabletExtraArgs = []string{"--queryserver-config-transaction-timeout", "5s"}
100-
if enableSettingsPool {
101-
clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--queryserver-enable-settings-pool")
102-
}
103-
if err := clusterInstance.StartKeyspace(*keyspace, []string{"-80", "80-"}, 1, true); err != nil {
104-
return 1
105-
}
106-
107-
// Start vtgate
108-
clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s"}
109-
if err := clusterInstance.StartVtgate(); err != nil {
110-
return 1
111-
}
112-
113-
vtParams = mysql.ConnParams{
114-
Host: clusterInstance.Hostname,
115-
Port: clusterInstance.VtgateMySQLPort,
116-
}
117-
return m.Run()
118104
}
119105

120106
func TestTabletChange(t *testing.T) {

0 commit comments

Comments
 (0)