Skip to content

Commit 1bdb462

Browse files
authored
[release-19.0] Release of v19.0.0-RC1 (#15139)
1 parent 7b20f7d commit 1bdb462

File tree

19 files changed

+827
-81
lines changed

19 files changed

+827
-81
lines changed

.github/workflows/code_freeze.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
steps:
1212
- name: Fail if Code Freeze is enabled
1313
run: |
14-
exit 1
14+
exit 0

changelog/19.0/19.0.0/changelog.md

Lines changed: 515 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
# Release of Vitess v19.0.0
2+
## Summary
3+
4+
### Table of Contents
5+
6+
- **[Major Changes](#major-changes)**
7+
- **[Dropping Support for MySQL 5.7](#drop-support-mysql57)**
8+
- **[Deprecations and Deletions](#deprecations-and-deletions)**
9+
- [VTTablet Flags](#vttablet-flags)
10+
- [Docker Image vitess/lite](#deprecation-vitess-lite-mysqld)
11+
- [Explain Statement Format](#explain-stmt-format)
12+
- **[Breaking Changes](#breaking-changes)**
13+
- [ExecuteFetchAsDBA rejects multi-statement SQL](#execute-fetch-as-dba-reject-multi)
14+
- **[New Stats](#new-stats)**
15+
- [Stream Consolidations](#stream-consolidations)
16+
- [Build Version in `/debug/vars`](#build-version-in-debug-vars)
17+
- **[Planned Reparent Shard](#planned-reparent-shard)**
18+
- [`--tolerable-replication-lag` Sub-flag](#tolerable-repl-lag)
19+
- **[Query Compatibility](#query-compatibility)**
20+
- [Multi Table Delete Support](#multi-table-delete)
21+
- [`SHOW VSCHEMA KEYSPACES` Query](#show-vschema-keyspaces)
22+
- [`FOREIGN_KEY_CHECKS` is now a Vitess Aware Variable](#fk-checks-vitess-aware)
23+
- [Explain Statement](#explain-statement)
24+
- [Partial Multi-shard Commit Warnings](#partial-multi-shard-commit-warnings)
25+
- [New Lock Syntax](#lock-syntax)
26+
- [Support for AVG()](#avg-support)
27+
- [Support for non-recursive CTEs](#cte-support)
28+
- **[Vttestserver](#vttestserver)**
29+
- [`--vtcombo-bind-host` flag](#vtcombo-bind-host)
30+
- **[Minor Changes](#minor-changes)**
31+
- **[Apply VSchema](#apply-vschema)**
32+
- [`--strict` sub-flag and `strict` gRPC field](#strict-flag-and-field)
33+
34+
## <a id="major-changes"/>Major Changes
35+
36+
### <a id="drop-support-mysql57"/>Dropping Support for MySQL 5.7
37+
38+
Oracle has marked MySQL 5.7 end of life as of October 2023. Vitess is also dropping support for MySQL 5.7 from v19 onwards. Users are advised to upgrade to MySQL 8.0 while on v18 version of Vitess before
39+
upgrading to v19.
40+
41+
Vitess will however, continue to support importing from MySQL 5.7 into Vitess even in v19.
42+
43+
44+
### <a id="deprecations-and-deletions"/>Deprecations and Deletions
45+
46+
- The `MYSQL_FLAVOR` environment variable is now removed from all Docker Images.
47+
48+
#### <a id="vttablet-flags"/>VTTablet Flags
49+
50+
- The following flags — which were deprecated in Vitess 7.0 — have been removed:
51+
`--vreplication_healthcheck_topology_refresh`, `--vreplication_healthcheck_retry_delay`, and `--vreplication_healthcheck_timeout`.
52+
- The `--vreplication_tablet_type` flag is now deprecated and ignored.
53+
54+
#### <a id="deprecation-vitess-lite-mysqld"/>Docker Image vitess/lite
55+
56+
The `mysqld` binary is now deprecated in the `vitess/lite` Docker image and will be removed in a future release.
57+
This means that the MySQL/Percona version specific image tags for the `vitess/lite` image are deprecated.
58+
59+
Below is a full list of available tags for `v19.0.0` and their deprecation status:
60+
61+
| Image | Deprecated |
62+
|---------------------------------|------------|
63+
| `vitess/lite:v19.0.0` | NO |
64+
| `vitess/lite:v19.0.0-mysql57` | YES |
65+
| `vitess/lite:v19.0.0-mysql80` | YES |
66+
| `vitess/lite:v19.0.0-percona57` | YES |
67+
| `vitess/lite:v19.0.0-percona80` | YES |
68+
69+
If you are currently using `vitess/lite` as your `mysqld` image in your vitess-operator deployment we invite you to use an official MySQL image, such as `mysql:8.0.30`.
70+
71+
Below is an example of a kubernetes yaml file before and after upgrading to an official MySQL image:
72+
73+
```yaml
74+
# before:
75+
76+
# the image used here includes MySQL 8.0.30 and its binaries
77+
78+
mysqld:
79+
mysql80Compatible: vitess/lite:v19.0.0-mysql80
80+
```
81+
```yaml
82+
# after:
83+
84+
# if we still want to use MySQL 8.0.30, we now have to use the
85+
# official MySQL image with the 8.0.30 tag as shown below
86+
87+
mysqld:
88+
mysql80Compatible: mysql:8.0.30 # or even mysql:8.0.34 for instance
89+
```
90+
91+
#### <a id="explain-stmt-format"/>Explain Statement Format
92+
93+
Explain statement format `vitess` and `vexplain` were deprecated in v16 and removed in v19 version.
94+
Use [VExplain Statement](https://vitess.io/docs/19.0/user-guides/sql/vexplain/) for understanding Vitess plans.
95+
96+
### <a id="breaking-changes"/>Breaking Changes
97+
98+
#### <a id="execute-fetch-as-dba-reject-multi"/>ExecuteFetchAsDBA rejects multi-statement SQL
99+
100+
`vtctldclient ExecuteFetchAsDBA` (and similarly the `vtctl` and `vtctlclient` commands) now reject multi-statement SQL with error.
101+
102+
For example, `vtctldclient ExecuteFetchAsDBA my-tablet "stop replica; change replication source to auto_position=1; start replica` will return an error, without attempting to execute any of these queries.
103+
104+
Previously, `ExecuteFetchAsDBA` silently accepted multi statement SQL. It would (attempt to) execute all of them, but:
105+
106+
- It would only indicate error for the first statement. Errors on 2nd, 3rd, ... statements were silently ignored.
107+
- It would not consume the result sets of the 2nd, 3rd, ... statements. It would then return the used connection to the pool in a dirty state. Any further query that happens to take that connection out of the pool could get unexpected results.
108+
- As another side effect, multi-statement schema changes would cause schema to be reloaded with only the first change, leaving the cached schema inconsistent with the underlying database.
109+
110+
`ExecuteFetchAsDBA` does allow a specific use case of multi-statement SQL, which is where all statements are in the form of `CREATE TABLE` or `CREATE VIEW`. This is to support a common pattern of schema initialization, formalized in `ApplySchema --batch-size` which uses `ExecuteFetchAsDBA` under the hood.
111+
112+
### <a id="new-stats"/>New Stats
113+
114+
#### <a id="stream-consolidations"/>Stream Consolidations
115+
116+
Prior to 19.0 VTTablet reported how much time non-streaming executions spend waiting for consolidations to occur. In 19.0, VTTablet reports a similar stat for streaming executions in `/debug/vars` stat `Waits.Histograms.StreamConsolidations`.
117+
118+
#### <a id="build-version-in-debug-vars"/>Build Version in `/debug/vars`
119+
120+
The build version (e.g., `19.0.0-SNAPSHOT`) has been added to `/debug/vars`, allowing users to programmatically inspect Vitess components' build version at runtime.
121+
122+
### <a id="planned-reparent-shard"/>Planned Reparent Shard
123+
124+
#### <a id="tolerable-repl-lag"/>`--tolerable-replication-lag` Sub-flag
125+
126+
A new sub-flag `--tolerable-replication-lag` has been added to the command `PlannedReparentShard` that allows users to specify the amount of replication lag that is considered acceptable for a tablet to be eligible for promotion when Vitess makes the choice of a new primary.
127+
This feature is opt-in and not specifying this sub-flag makes Vitess ignore the replication lag entirely.
128+
129+
A new flag in VTOrc with the same name has been added to control the behaviour of the PlannedReparentShard calls that VTOrc issues.
130+
131+
### <a id="query-compatibility"/>Query Compatibility
132+
133+
#### <a id="multi-table-delete"/> Multi Table Delete Support
134+
135+
Support is added for sharded multi-table delete with target on single table using multiple table join.
136+
137+
Example: `Delete t1 from t1 join t2 on t1.id = t2.id join t3 on t1.col = t3.col where t3.foo = 5 and t2.bar = 7`
138+
139+
More details about how it works is available in [MySQL Docs](https://dev.mysql.com/doc/refman/8.0/en/delete.html)
140+
141+
#### <a id="show-vschema-keyspaces"/>`SHOW VSCHEMA KEYSPACES` Query
142+
143+
A SQL query, `SHOW VSCHEMA KEYSPACES` is now supported in Vitess. This query prints the vschema information
144+
for all the keyspaces. It is useful for seeing the foreign key mode, whether the keyspace is sharded, and if there is an
145+
error in the VSchema for the keyspace.
146+
147+
An example output of the query looks like -
148+
```sql
149+
mysql> show vschema keyspaces;
150+
+----------+---------+-------------+---------+
151+
| Keyspace | Sharded | Foreign Key | Comment |
152+
+----------+---------+-------------+---------+
153+
| ks | true | managed | |
154+
| uks | false | managed | |
155+
+----------+---------+-------------+---------+
156+
2 rows in set (0.01 sec)
157+
```
158+
159+
#### <a id="fk-checks-vitess-aware"/>`FOREIGN_KEY_CHECKS` is now a Vitess Aware Variable
160+
161+
When VTGate receives a query to change the `FOREIGN_KEY_CHECKS` value for a session, instead of sending the value down to MySQL, VTGate now keeps track of the value and changes the queries by adding `SET_VAR(FOREIGN_KEY_CHECKS=On/Off)` style query optimizer hints wherever required.
162+
163+
#### <a id="explain-statement"/>Explain Statement
164+
165+
`Explain` statement can handle routed table queries now. `Explain` is unsupported when the tables involved in the query refers more than one keyspace. Users should use [VExplain Statement](https://vitess.io/docs/19.0/user-guides/sql/vexplain/) in those cases.
166+
167+
#### <a id="partial-multi-shard-commit-warnings"/>Partial Multi-shard Commit Warnings
168+
169+
When using `multi` transaction mode (the default), it is possible for Vitess to successfully commit to one shard, but fail to commit to a subsequent shard, thus breaking the atomicity of a multi-shard transaction.
170+
171+
In `v19.0`, VTGate reports partial-success commits in warnings, e.g.:
172+
173+
```mysql
174+
mysql> commit;
175+
ERROR 1317 (70100): target: customer.-80.primary: vttablet: rpc error: code = Aborted desc = transaction 1703182545849001001: ended at 2023-12-21 14:07:41.515 EST (exceeded timeout: 30s) (CallerID: userData1)
176+
mysql> show warnings;
177+
+---------+------+----------------------------------------------------------+
178+
| Level | Code | Message |
179+
+---------+------+----------------------------------------------------------+
180+
| Warning | 301 | multi-db commit failed after committing to 1 shards: 80- |
181+
+---------+------+----------------------------------------------------------+
182+
1 row in set, 1 warning (0.00 sec)
183+
```
184+
185+
### <a id="vttestserver"/>Vttestserver
186+
187+
#### <a id="vtcombo-bind-host"/>`--vtcombo-bind-host` flag
188+
189+
A new flag `--vtcombo-bind-host` has been added to vttestserver that allows the users to configure the bind host that vtcombo uses. This is especially useful when running vttestserver as a docker image and you want to run vtctld commands and look at the vtcombo `/debug/status` dashboard.
190+
191+
### <a id="lock-syntax"/>New lock syntax
192+
193+
Vitess now supports the following LOCK syntax
194+
195+
```sql
196+
SELECT .. FOR SHARE (NOWAIT|SKIP LOCKED)
197+
SELECT .. FOR UPDATE (NOWAIT|SKIP LOCKED)
198+
```
199+
200+
### <a id="avg-support"/>Support for AVG() aggregation function
201+
202+
Vtgate can now evaluate `AVG` on sharded keyspaces, by using a combination of `SUM/COUNT`
203+
204+
### <a id="cte-support"/>Support for non-recursive CTEs
205+
206+
Common table expressions that are not recursive can now be used.
207+
208+
```sql
209+
with userCount as (
210+
select id, count(*) as nr from user group by id)
211+
select ref.col, userCount.nr
212+
from ref join userCount on ref.user_id = userCount.id
213+
```
214+
215+
## <a id="minor-changes"/>Minor Changes
216+
217+
### <a id="apply-vschema"/>Apply VSchema
218+
219+
#### <a id="strict-flag-and-field"/>`--strict` sub-flag and `strict` gRPC field
220+
221+
A new sub-flag `--strict` has been added to the command `ApplyVSchema` `vtctl` command that produces an error if unknown params are found in any Vindexes. An equivalent `strict` field has been added to the `ApplyVSchema` gRPC `vtctld` command.
222+
223+
224+
The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/19.0/19.0.0/changelog.md).
225+
226+
The release includes 412 merged Pull Requests.
227+
228+
Thanks to all our contributors: @ChaitanyaD48, @EshaanAgg, @FirePing32, @GuptaManan100, @Its-Maniaco, @Maniktherana, @Manni-99, @MrFabio, @VaibhavMalik4187, @ajm188, @aparajon, @app/dependabot, @app/github-actions, @app/vitess-bot, @aquarapid, @arthurschreiber, @austenLacy, @beingnoble03, @brendar, @davidpiegza, @dbussink, @deepthi, @derekperkins, @ejortegau, @frouioui, @gerayking, @glokta1, @harshit-gangal, @iheanyi, @jwangace, @lixin963, @mattlord, @mattrobenolt, @maxenglander, @mcrauwel, @mdlayher, @olyazavr, @pbibra, @pnacht, @rajivharlalka, @ravicodelabs, @rbranson, @rohit-nayak-ps, @samanthadrago, @shlomi-noach, @skullface, @systay, @testwill, @tycol7, @vmg, @wangweicugw, @williammartin, @wlx5575
229+

changelog/19.0/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
## v19.0
22
* **[19.0.0](19.0.0)**
3+
* [Changelog](19.0.0/changelog.md)
4+
* [Release Notes](19.0.0/release_notes.md)

examples/compose/docker-compose.beginners.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ services:
5858
- "3306"
5959

6060
vtctld:
61-
image: vitess/lite:${VITESS_TAG:-latest}
61+
image: vitess/lite:v19.0.0-rc1
6262
ports:
6363
- "15000:$WEB_PORT"
6464
- "$GRPC_PORT"
@@ -81,7 +81,7 @@ services:
8181
condition: service_healthy
8282
8383
vtgate:
84-
image: vitess/lite:${VITESS_TAG:-latest}
84+
image: vitess/lite:v19.0.0-rc1
8585
ports:
8686
- "15099:$WEB_PORT"
8787
- "$GRPC_PORT"
@@ -111,7 +111,7 @@ services:
111111
condition: service_healthy
112112

113113
schemaload:
114-
image: vitess/lite:${VITESS_TAG:-latest}
114+
image: vitess/lite:v19.0.0-rc1
115115
command:
116116
- sh
117117
- -c
@@ -144,12 +144,12 @@ services:
144144
environment:
145145
- KEYSPACES=$KEYSPACE
146146
- GRPC_PORT=15999
147-
image: vitess/lite:${VITESS_TAG:-latest}
147+
image: vitess/lite:v19.0.0-rc1
148148
volumes:
149149
- .:/script
150150

151151
vttablet100:
152-
image: vitess/lite:${VITESS_TAG:-latest}
152+
image: vitess/lite:v19.0.0-rc1
153153
ports:
154154
- "15100:$WEB_PORT"
155155
- "$GRPC_PORT"
@@ -181,7 +181,7 @@ services:
181181
retries: 15
182182

183183
vttablet101:
184-
image: vitess/lite:${VITESS_TAG:-latest}
184+
image: vitess/lite:v19.0.0-rc1
185185
ports:
186186
- "15101:$WEB_PORT"
187187
- "$GRPC_PORT"
@@ -213,7 +213,7 @@ services:
213213
retries: 15
214214

215215
vttablet102:
216-
image: vitess/lite:${VITESS_TAG:-latest}
216+
image: vitess/lite:v19.0.0-rc1
217217
ports:
218218
- "15102:$WEB_PORT"
219219
- "$GRPC_PORT"
@@ -245,7 +245,7 @@ services:
245245
retries: 15
246246

247247
vttablet103:
248-
image: vitess/lite:${VITESS_TAG:-latest}
248+
image: vitess/lite:v19.0.0-rc1
249249
ports:
250250
- "15103:$WEB_PORT"
251251
- "$GRPC_PORT"
@@ -277,7 +277,7 @@ services:
277277
retries: 15
278278

279279
vtorc:
280-
image: vitess/lite:${VITESS_TAG:-latest}
280+
image: vitess/lite:v19.0.0-rc1
281281
command: ["sh", "-c", "/script/vtorc-up.sh"]
282282
depends_on:
283283
- vtctld
@@ -307,7 +307,7 @@ services:
307307
retries: 15
308308

309309
vreplication:
310-
image: vitess/lite:${VITESS_TAG:-latest}
310+
image: vitess/lite:v19.0.0-rc1
311311
volumes:
312312
- ".:/script"
313313
environment:

0 commit comments

Comments
 (0)