Skip to content

Commit 7908b43

Browse files
[release-21.0] Release of v21.0.0-RC1 (#16950)
Signed-off-by: Rohit Nayak <[email protected]> Co-authored-by: Rohit Nayak <[email protected]>
1 parent fef6ce7 commit 7908b43

File tree

19 files changed

+778
-86
lines changed

19 files changed

+778
-86
lines changed

changelog/21.0/21.0.0/changelog.md

Lines changed: 445 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
# Release of Vitess v21.0.0
2+
## Summary
3+
4+
### Table of Contents
5+
6+
- **[Major Changes](#major-changes)**
7+
- **[Deprecations and Deletions](#deprecations-and-deletions)**
8+
- [Deprecated VTTablet Flags](#vttablet-flags)
9+
- [Deletion of deprecated metrics](#metric-deletion)
10+
- [Deprecated Metrics](#deprecations-metrics)
11+
- **[Traffic Mirroring](#traffic-mirroring)**
12+
- **[New VTGate Shutdown Behavior](#new-vtgate-shutdown-behavior)**
13+
- **[Tablet Throttler: Multi-Metric support](#tablet-throttler)**
14+
- **[Allow Cross Cell Promotion in PRS](#allow-cross-cell)**
15+
- **[Support for recursive CTEs](#recursive-cte)**
16+
- **[VTGate Tablet Balancer](#tablet-balancer)**
17+
- **[Query Timeout Override](#query-timeout)**
18+
- **[New Backup Engine](#new-backup-engine)**
19+
- **[Dynamic VReplication Configuration](#dynamic-vreplication-configuration)**
20+
- **[Reference Table Materialization](#reference-table-materialization)**
21+
- **[New VEXPLAIN Modes: TRACE and KEYS](#new-vexplain-modes)**
22+
- **[Errant GTID Detection on VTTablets](#errant-gtid-vttablet)**
23+
- **[Automatically Replace MySQL auto_increment Clauses with Vitess Sequences](#auto-replace-mysql-autoinc-with-seq)**
24+
- **[Experimental MySQL 8.4 support](#experimental-mysql-84)**
25+
- **[Current Errant GTIDs Count Metric](#errant-gtid-metric)**
26+
- **[vtctldclient ChangeTabletTags](#vtctldclient-changetablettags)**
27+
28+
29+
## <a id="major-changes"/>Major Changes</a>
30+
31+
### <a id="deprecations-and-deletions"/>Deprecations and Deletions</a>
32+
33+
#### <a id="vttablet-flags"/>Deprecated VTTablet Flags</a>
34+
35+
- `queryserver-enable-settings-pool` flag, added in `v15`, has been on by default since `v17`.
36+
It is now deprecated and will be removed in a future release.
37+
38+
#### <a id="metric-deletion"/>Deletion of deprecated metrics</a>
39+
40+
The following VTOrc metrics were deprecated in `v20`. They have now been deleted.
41+
42+
| Metric Name |
43+
|:--------------------------------------------:|
44+
| `analysis.change.write` |
45+
| `audit.write` |
46+
| `discoveries.attempt` |
47+
| `discoveries.fail` |
48+
| `discoveries.instance_poll_seconds_exceeded` |
49+
| `discoveries.queue_length` |
50+
| `discoveries.recent_count` |
51+
| `instance.read` |
52+
| `instance.read_topology` |
53+
| `emergency_reparent_counts` |
54+
| `planned_reparent_counts` |
55+
| `reparent_shard_operation_timings` |
56+
57+
#### <a id="deprecations-metrics"/>Deprecated Metrics</a>
58+
59+
The following metrics are now deprecated and will be deleted in a future release, please use their replacements.
60+
61+
| Component | Metric Name | Replaced By |
62+
|------------|:---------------------:|:-------------------------------:|
63+
| `vttablet` | `QueryCacheLength` | `QueryEnginePlanCacheLength` |
64+
| `vttablet` | `QueryCacheSize` | `QueryEnginePlanCacheSize` |
65+
| `vttablet` | `QueryCacheCapacity` | `QueryEnginePlanCacheCapacity` |
66+
| `vttablet` | `QueryCacheEvictions` | `QueryEnginePlanCacheEvictions` |
67+
| `vttablet` | `QueryCacheHits` | `QueryEnginePlanCacheHits` |
68+
| `vttablet` | `QueryCacheMisses` | `QueryEnginePlanCacheMisses` |
69+
70+
### <a id="traffic-mirroring"/>Traffic Mirroring</a>
71+
72+
Traffic mirroring is intended to help reduce some of the uncertainty inherent to `MoveTables SwitchTraffic`. When
73+
traffic mirroring is enabled, VTGate will mirror a percentage of traffic from one keyspace to another.
74+
75+
Mirror rules may be enabled through `vtctldclient` with `MoveTables MirrorTraffic`. For example:
76+
77+
```bash
78+
$ vtctldclient --server :15999 MoveTables --target-keyspace customer --workflow commerce2customer MirrorTraffic --percent 5.0
79+
```
80+
81+
Mirror rules can be inspected with `GetMirrorRules`.
82+
83+
### <a id="new-vtgate-shutdown-behavior"/>New VTGate Shutdown Behavior</a>
84+
85+
We added a new option to VTGate to disallow new connections while VTGate is shutting down,
86+
while allowing existing connections to finish their work until they manually disconnect or until
87+
the `--onterm_timeout` is reached, without getting a `Server shutdown in progress` error.
88+
89+
This new behavior can be enabled by specifying the new `--mysql-server-drain-onterm` flag to VTGate.
90+
91+
You can find more information about this option in the [RFC](https://github.com/vitessio/vitess/issues/15971).
92+
93+
### <a id="tablet-throttler"/>Tablet Throttler: Multi-Metric support</a>
94+
95+
Up until `v20`, the tablet throttler would only monitor and use a single metric. That would be replication lag, by
96+
default, or could be the result of a custom query. In this release, we introduce a major redesign so that the throttler
97+
monitors and uses multiple metrics at the same time, including the above two.
98+
99+
The default behavior now is to monitor all metrics, but only use `lag` (if the custom query is undefined) or the `custom`
100+
metric (if the custom query is defined). This is backwards-compatible with `v20`. A `v20` `PRIMARY` is compatible with
101+
a `v21` `REPLICA`, and a `v21` `PRIMARY` is compatible with a `v20` `REPLICA`.
102+
103+
However, it is now possible to assign any combination of one or more metrics for a given app. The throttler
104+
would then accept or reject the app's requests based on the health of _all_ assigned metrics. We have provided a pre-defined
105+
list of metrics:
106+
107+
- `lag`: replication lag based on heartbeat injection.
108+
- `threads_running`: concurrent active threads on the MySQL server.
109+
- `loadavg`: per core load average measured on the tablet instance/pod.
110+
- `custom`: the result of a custom query executed on the MySQL server.
111+
112+
Each metric has a default threshold which can be overridden by the `UpdateThrottlerConfig` command.
113+
114+
The throttler also supports the catch-all `"all"` app name, and it is thus possible to assign metrics to **all** apps.
115+
Explicit app to metric assignments will override the catch-all configuration.
116+
117+
Metrics are assigned a default _scope_, which could be `self` (isolated to the tablet) or `shard` (max, aka **worst**
118+
value among shard tablets). It is further possible to require a different scope for each metric.
119+
120+
### <a id="allow-cross-cell"/>Allow Cross Cell Promotion in PRS</a>
121+
122+
Up until now if the users wanted to promote a replica in a different cell from the current primary
123+
using `PlannedReparentShard`, they had to specify the new primary with the `--new-primary` flag.
124+
125+
We have now added a new flag `--allow-cross-cell-promotion` that lets `PlannedReparentShard` choose a primary in a
126+
different cell even if no new primary is provided explicitly.
127+
128+
### <a id="recursive-cte"/>Experimental support for recursive CTEs</a>
129+
130+
We have added experimental support for recursive CTEs in Vitess. We are marking it as experimental because it is not yet
131+
fully tested and may have some limitations. We are looking for feedback from the community to improve this feature.
132+
133+
### <a id="tablet-balancer"/>VTGate Tablet Balancer</a>
134+
135+
When a VTGate routes a query and has multiple available tablets for a given shard / tablet type (e.g. REPLICA), the
136+
current default behavior routes the query with local cell affinity and round robin policy. The VTGate Tablet Balancer
137+
provides an alternate mechanism that routes queries to maintain an even distribution of query load to each tablet, while
138+
preferentially routing to tablets in the same cell as the VTGate.
139+
140+
The tablet balancer is enabled by a new flag `--enable-balancer` and configured by `--balancer-vtgate-cells`
141+
and `--balancer-keyspaces`.
142+
143+
See the [RFC ](https://github.com/vitessio/vitess/issues/12241) for more details on the design and configuration of this feature.
144+
145+
### <a id="query-timeout"/>Query Timeout Override</a>
146+
147+
VTGate sends an authoritative query timeout to VTTablet when the `QUERY_TIMEOUT_MS` comment directive,
148+
`query_timeout` session system variable, or `query-timeout` flag is set.
149+
The order of precedence is: comment directive > session variable > VTGate flag.
150+
VTTablet overrides its default query timeout with the value received from VTGate.
151+
All timeouts are specified in milliseconds.
152+
153+
When a query is executed inside a transaction, there is an additional nuance. The actual timeout used will be the smaller
154+
of the transaction timeout and the query timeout.
155+
156+
A query can also be set to have no timeout by using the `QUERY_TIMEOUT_MS` comment directive with a value of `0`.
157+
158+
Example usage:
159+
`select /*vt+ QUERY_TIMEOUT_MS=30 */ col from tbl`
160+
161+
### <a id="new-backup-engine"/>New Backup Engine (EXPERIMENTAL)</a>
162+
163+
We are introducing a new backup engine for logical backups in order to support use cases that require something other
164+
than physical backups. This feature is experimental and is based on [MySQL Shell](https://dev.mysql.com/doc/mysql-shell/8.0/en/).
165+
166+
The new engine is enabled by using `--backup_engine_implementation=mysqlshell`. There are other options that are required,
167+
so please read the [documentation](https://vitess.io/docs/21.0/user-guides/operating-vitess/backup-and-restore/creating-a-backup/) to learn which options are required and how to configure them.
168+
169+
### <a id="dynamic-vreplication-configuration"/>Dynamic VReplication Configuration</a>
170+
171+
Previously, many of the configuration options for VReplication Workflows had to be provided using VTTablet flags. This
172+
meant that any change to VReplication configuration required restarting VTTablets. We now allow these to be overridden
173+
while creating a workflow or dynamically after the workflow is already in progress.
174+
175+
### <a id="reference-table-materialization"/>Reference Table Materialization</a>
176+
177+
There is a new option in [`Materialize` workflows](https://vitess.io/docs/reference/vreplication/materialize/) to keep a synced copy of [reference or lookup tables](https://vitess.io/docs/reference/vreplication/reference_tables/)
178+
(countries, states, zip codes, etc) from an unsharded keyspace, which holds the source of truth for the reference
179+
table, to all shards in a sharded keyspace.
180+
181+
### <a id="new-vexplain-modes"/>New VEXPLAIN Modes: TRACE and KEYS</a>
182+
183+
#### VEXPLAIN TRACE
184+
185+
The new `TRACE` mode for `VEXPLAIN` provides a detailed execution trace of queries, showing how they're processed through various
186+
operators and interactions with tablets. This mode is particularly useful for:
187+
188+
- Identifying performance bottlenecks
189+
- Understanding query execution patterns
190+
- Optimizing complex queries
191+
- Debugging unexpected query behavior
192+
193+
`TRACE` mode runs the query and logs all interactions, returning a JSON representation of the query execution plan with additional
194+
statistics like number of calls, average rows processed, and number of shards queried.
195+
196+
#### VEXPLAIN KEYS
197+
198+
The `KEYS` mode for `VEXPLAIN` offers a concise summary of query structure, highlighting columns used in joins, filters, and
199+
grouping operations. This information is crucial for:
200+
201+
- Identifying potential sharding key candidates
202+
- Optimizing query performance
203+
- Analyzing query patterns to inform database design decisions
204+
205+
`KEYS` mode analyzes the query structure without executing it, providing JSON output that includes grouping columns, join columns,
206+
filter columns (potential candidates for indexes, primary keys, or sharding keys), and the statement type.
207+
208+
These new `VEXPLAIN` modes enhance Vitess's query analysis capabilities, allowing for more informed decisions about sharding
209+
strategies and query optimization.
210+
211+
### <a id="errant-gtid-vttablet"/>Errant GTID Detection on VTTablets</a>
212+
213+
VTTablets now run an errant GTID detection logic before they join the replication stream. So, if a replica has an errant GTID, it will
214+
not start replicating from the primary. This protects us from running into situations which are very difficult to recover from.
215+
216+
For users running with the vitess-operator on Kubernetes, this change means that replica tablets with errant GTIDs will have broken
217+
replication and will report as unready. Users will need to manually replace and clean up these errant replica tablets.
218+
219+
### <a id="auto-replace-mysql-autoinc-with-seq"/>Automatically Replace MySQL auto_increment Clauses with Vitess Sequences</a>
220+
221+
In https://github.com/vitessio/vitess/pull/16860 we added support for replacing MySQL `auto_increment` clauses with [Vitess Sequences](https://vitess.io/docs/reference/features/vitess-sequences/), performing all of the setup and initialization
222+
work automatically during the [`MoveTables`](https://vitess.io/docs/reference/vreplication/movetables/) workflow. As part of that work we have deprecated the
223+
[`--remove-sharded-auto-increment` boolean flag](https://vitess.io/docs/20.0/reference/programs/vtctldclient/vtctldclient_movetables/vtctldclient_movetables_create/) and you should begin using the new
224+
[`--sharded-auto-increment-handling` flag](https://vitess.io/docs/21.0/reference/programs/vtctldclient/vtctldclient_movetables/vtctldclient_movetables_create/) instead. Please see the new
225+
[`MoveTables` Auto Increment Handling](https://vitess.io/docs/21.0/reference/vreplication/movetables/#auto-increment-handling) documentation for additional details.
226+
227+
### <a id="experimental-mysql-84"/>Experimental MySQL 8.4 support
228+
229+
We have added experimental support for MySQL 8.4. It passes the Vitess test suite, but it is otherwise not yet tested. We are looking for feedback from the community to improve this to move support out of the experimental phase in a future release.
230+
231+
### <a id="errant-gtid-metric"/>Current Errant GTIDs Count Metric
232+
A new metric called `CurrentErrantGTIDCount` has been added to the `VTOrc` component.
233+
This metric shows the current count of the errant GTIDs in the tablets.
234+
235+
### <a id="vtctldclient-changetablettags"/>`vtctldclient ChangeTabletTags` command
236+
237+
The `vtctldclient` command `ChangeTabletTags` was added to allow the tags of a tablet to be changed dynamically.
238+
239+
------------
240+
The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/21.0/21.0.0/changelog.md).
241+
242+
The release includes 338 merged Pull Requests.
243+
244+
Thanks to all our contributors: @GrahamCampbell, @GuptaManan100, @Utkar5hM, @anshikavashistha, @app/dependabot, @app/vitess-bot, @arthurschreiber, @beingnoble03, @brendar, @cameronmccord2, @chrism1001, @cuishuang, @dbussink, @deepthi, @demmer, @frouioui, @harshit-gangal, @harshitasao, @icyflame, @kirtanchandak, @mattlord, @mattrobenolt, @maxenglander, @mcrauwel, @notfelineit, @perminov, @rafer, @rohit-nayak-ps, @runewake2, @rvrangel, @shanth96, @shlomi-noach, @systay, @timvaillancourt, @vitess-bot
245+

changelog/21.0/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
## v21.0
22
* **[21.0.0](21.0.0)**
3+
* [Changelog](21.0.0/changelog.md)
4+
* [Release Notes](21.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:v21.0.0-rc1
6262
ports:
6363
- "15000:$WEB_PORT"
6464
- "$GRPC_PORT"
@@ -83,7 +83,7 @@ services:
8383
condition: service_healthy
8484
8585
vtgate:
86-
image: vitess/lite:${VITESS_TAG:-latest}
86+
image: vitess/lite:v21.0.0-rc1
8787
ports:
8888
- "15099:$WEB_PORT"
8989
- "$GRPC_PORT"
@@ -113,7 +113,7 @@ services:
113113
condition: service_healthy
114114

115115
schemaload:
116-
image: vitess/lite:${VITESS_TAG:-latest}
116+
image: vitess/lite:v21.0.0-rc1
117117
command:
118118
- sh
119119
- -c
@@ -146,12 +146,12 @@ services:
146146
environment:
147147
- KEYSPACES=$KEYSPACE
148148
- GRPC_PORT=15999
149-
image: vitess/lite:${VITESS_TAG:-latest}
149+
image: vitess/lite:v21.0.0-rc1
150150
volumes:
151151
- .:/script
152152

153153
vttablet100:
154-
image: vitess/lite:${VITESS_TAG:-latest}
154+
image: vitess/lite:v21.0.0-rc1
155155
ports:
156156
- "15100:$WEB_PORT"
157157
- "$GRPC_PORT"
@@ -183,7 +183,7 @@ services:
183183
retries: 15
184184

185185
vttablet101:
186-
image: vitess/lite:${VITESS_TAG:-latest}
186+
image: vitess/lite:v21.0.0-rc1
187187
ports:
188188
- "15101:$WEB_PORT"
189189
- "$GRPC_PORT"
@@ -215,7 +215,7 @@ services:
215215
retries: 15
216216

217217
vttablet102:
218-
image: vitess/lite:${VITESS_TAG:-latest}
218+
image: vitess/lite:v21.0.0-rc1
219219
ports:
220220
- "15102:$WEB_PORT"
221221
- "$GRPC_PORT"
@@ -247,7 +247,7 @@ services:
247247
retries: 15
248248

249249
vttablet103:
250-
image: vitess/lite:${VITESS_TAG:-latest}
250+
image: vitess/lite:v21.0.0-rc1
251251
ports:
252252
- "15103:$WEB_PORT"
253253
- "$GRPC_PORT"
@@ -279,7 +279,7 @@ services:
279279
retries: 15
280280

281281
vtorc:
282-
image: vitess/lite:${VITESS_TAG:-latest}
282+
image: vitess/lite:v21.0.0-rc1
283283
command: ["sh", "-c", "/script/vtorc-up.sh"]
284284
depends_on:
285285
- vtctld
@@ -309,7 +309,7 @@ services:
309309
retries: 15
310310

311311
vreplication:
312-
image: vitess/lite:${VITESS_TAG:-latest}
312+
image: vitess/lite:v21.0.0-rc1
313313
volumes:
314314
- ".:/script"
315315
environment:

0 commit comments

Comments
 (0)