Skip to content

Releases: vitessio/vitess

Vitess v19.0.0-rc1

07 Feb 14:22
1bdb462
Compare
Choose a tag to compare
Vitess v19.0.0-rc1 Pre-release
Pre-release

Release of Vitess v19.0.0

Summary

Table of Contents

Major Changes

Dropping Support for MySQL 5.7

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
upgrading to v19.

Vitess will however, continue to support importing from MySQL 5.7 into Vitess even in v19.

Deprecations and Deletions

  • The MYSQL_FLAVOR environment variable is now removed from all Docker Images.

VTTablet Flags

  • The following flags — which were deprecated in Vitess 7.0 — have been removed:
    --vreplication_healthcheck_topology_refresh, --vreplication_healthcheck_retry_delay, and --vreplication_healthcheck_timeout.
  • The --vreplication_tablet_type flag is now deprecated and ignored.

Docker Image vitess/lite

The mysqld binary is now deprecated in the vitess/lite Docker image and will be removed in a future release.
This means that the MySQL/Percona version specific image tags for the vitess/lite image are deprecated.

Below is a full list of available tags for v19.0.0 and their deprecation status:

Image Deprecated
vitess/lite:v19.0.0 NO
vitess/lite:v19.0.0-mysql57 YES
vitess/lite:v19.0.0-mysql80 YES
vitess/lite:v19.0.0-percona57 YES
vitess/lite:v19.0.0-percona80 YES

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.

Below is an example of a kubernetes yaml file before and after upgrading to an official MySQL image:

# before:

# the image used here includes MySQL 8.0.30 and its binaries

    mysqld:
      mysql80Compatible: vitess/lite:v19.0.0-mysql80
# after:

# if we still want to use MySQL 8.0.30, we now have to use the
# official MySQL image with the 8.0.30 tag as shown below 

    mysqld:
      mysql80Compatible: mysql:8.0.30 # or even mysql:8.0.34 for instance

Explain Statement Format

Explain statement format vitess and vexplain were deprecated in v16 and removed in v19 version.
Use VExplain Statement for understanding Vitess plans.

Breaking Changes

ExecuteFetchAsDBA rejects multi-statement SQL

vtctldclient ExecuteFetchAsDBA (and similarly the vtctl and vtctlclient commands) now reject multi-statement SQL with error.

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.

Previously, ExecuteFetchAsDBA silently accepted multi statement SQL. It would (attempt to) execute all of them, but:

  • It would only indicate error for the first statement. Errors on 2nd, 3rd, ... statements were silently ignored.
  • 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.
  • 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.

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.

New Stats

Stream Consolidations

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.

Build Version in /debug/vars

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.

Planned Reparent Shard

--tolerable-replication-lag Sub-flag

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.
This feature is opt-in and not specifying this sub-flag makes Vitess ignore the replication lag entirely.

A new flag in VTOrc with the same name has been added to control the behaviour of the PlannedReparentShard calls that VTOrc issues.

Query Compatibility

Multi Table Delete Support

Support is added for sharded multi-table delete with target on single table using multiple table join.

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

More details about how it works is available in MySQL Docs

SHOW VSCHEMA KEYSPACES Query

A SQL query, SHOW VSCHEMA KEYSPACES is now supported in Vitess. This query prints the vschema information
for all the keyspaces. It is useful for seeing the foreign key mode, whether the keyspace is sharded, and if there is an
error in the VSchema for the keyspace.

An example output of the query looks like -

mysql> show vschema keyspaces;
+----------+---------+-------------+---------+
| Keyspace | Sharded | Foreign Key | Comment |
+----------+---------+-------------+---------+
| ks       | true    | managed     |         |
| uks      | false   | managed     |         |
+----------+---------+-------------+---------+
2 rows in set (0.01 sec)

FOREIGN_KEY_CHECKS is now a Vitess Aware Variable

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.

Explain Statement

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 in those cases.

Partial Multi-shard Commit Warnings

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.

In v19.0, VTGate reports partial-success commits in warnings, e.g.:

mysql> commit;
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)
mysql> show warnings;
+---------+------+----------------------------------------------------------+
| Level   | Code | Message                                                  |
+---------+------+----------------------------------------------------------+
| Warning |  301 | multi-db commit failed after committing to 1 shards: 80- |
+---------+------+----------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)

Vttestserver

--vtcombo-bind-host flag

A new flag --vtcombo-bind-host has been added to vttestserver that allows the us...

Read more

Vitess v18.0.2

20 Dec 14:19
d3012c1
Compare
Choose a tag to compare

Release of Vitess v18.0.2

The entire changelog for this release can be found here.

The release includes 27 merged Pull Requests.

Thanks to all our contributors: @brendar, @deepthi, @harshit-gangal, @rohit-nayak-ps, @systay

Vitess v17.0.5

20 Dec 14:15
9a36280
Compare
Choose a tag to compare

Release of Vitess v17.0.5

The entire changelog for this release can be found here.

The release includes 22 merged Pull Requests.

Thanks to all our contributors: @GuptaManan100, @deepthi, @frouioui, @harshit-gangal, @shlomi-noach, @systay

Vitess v16.0.7

20 Dec 14:09
6c9f87d
Compare
Choose a tag to compare

Release of Vitess v16.0.7

The entire changelog for this release can be found here.

The release includes 18 merged Pull Requests.

Thanks to all our contributors: @GuptaManan100, @deepthi, @frouioui, @harshit-gangal, @maxenglander, @shlomi-noach, @systay

Vitess v18.0.1

22 Nov 08:53
aa72dc8
Compare
Choose a tag to compare

Release of Vitess v18.0.1

The entire changelog for this release can be found here.

The release includes 17 merged Pull Requests.

Thanks to all our contributors: @app/vitess-bot, @frouioui, @harshit-gangal, @shlomi-noach

Vitess v17.0.4

13 Nov 08:15
9a3d0f4
Compare
Choose a tag to compare

Release of Vitess v17.0.4

The entire changelog for this release can be found here.

The release includes 23 merged Pull Requests.

Thanks to all our contributors: @GuptaManan100, @app/github-actions, @app/vitess-bot, @mattlord, @shlomi-noach

Vitess v16.0.6

13 Nov 07:55
a7f80a8
Compare
Choose a tag to compare

Release of Vitess v16.0.6

The entire changelog for this release can be found here.

The release includes 21 merged Pull Requests.

Thanks to all our contributors: @app/github-actions, @app/vitess-bot, @harshit-gangal, @shlomi-noach

Vitess v18.0.0

06 Nov 12:13
9a6f526
Compare
Choose a tag to compare

Release of Vitess v18.0.0

Summary

Table of Contents

Major Changes

Breaking Changes

Local examples now use etcd v3 storage and API

In previous releases the local examples were
explicitly using etcd v2 storage (etcd --enable-v2=true) and API (ETCDCTL_API=2) mode. We have now
removed this legacy etcd usage and instead use the new (default) etcd v3 storage and API. Please see
PR #13791 for details. If you are using the local
examples in any sort of long-term non-testing capacity, then you will need to explicitly use the v2 storage
and API mode or migrate your existing data from v2 to v3.

New command line flags and behavior

VTOrc flag --allow-emergency-reparent

VTOrc has a new flag --allow-emergency-reparent that specifies whether VTOrc is allowed to run emergency
failover operations. Users that want VTOrc to fix replication issues, but don't want it to run any failovers
should use this flag. This flag defaults to true which corresponds to the default behavior from prior releases.

VTOrc flag --change-tablets-with-errant-gtid-to-drained

VTOrc has a new flag --change-tablets-with-errant-gtid-to-drained that allows users to choose whether VTOrc should change the
tablet type of tablets with errant GTIDs to DRAINED. By default, this flag is disabled.

This feature allows users to configure VTOrc such that any tablet that encounters errant GTIDs is automatically taken out of the
serving graph. These tablets can then be inspected for what the errant GTIDs are, and once fixed, they can rejoin the cluster.

ERS sub flag --wait-for-all-tablets

vtctldclient command EmergencyReparentShard has a new sub-flag --wait-for-all-tablets that makes EmergencyReparentShard wait
for a response from all the tablets. Originally EmergencyReparentShard was meant only to be run when a primary tablet is unreachable.
We have realized now that there are cases when replication is broken but all tablets are reachable. In these cases, it is advisable to
call EmergencyReparentShard with --wait-for-all-tablets so that it does not ignore any of the tablets.

VTGate GRPC stream execute session flag --grpc-send-session-in-streaming

This flag enables transaction support on VTGate's StreamExecute gRPC API.
When this is enabled, StreamExecute will return the session in the last packet of the response.
Users should enable this flag only after client code has been changed to expect such a packet.

It is disabled by default.

Experimental Foreign Key Support

A new optional field foreignKeyMode has been added to the VSchema. This field can be provided for each keyspace. The VTGate flag --foreign_key_mode has been deprecated in favor of this field.

There are 3 foreign key modes now supported in Vitess -

  1. unmanaged -
    This mode represents the default behavior in Vitess, where it does not manage foreign key column references. Users are responsible for configuring foreign keys in MySQL in such a way that related rows, as determined by foreign keys, reside within the same shard.
  2. managed [EXPERIMENTAL] -
    In this experimental mode, Vitess is fully aware of foreign key relationships and actively tracks foreign key constraints using the schema tracker. VTGate will handle DML operations with foreign keys and correctly cascade updates and deletes.
    It will also verify restrict constraints and validate the existence of parent rows before inserting child rows.
    This ensures that all child operations are logged in binary logs, unlike the InnoDB implementation of foreign keys.
    This allows the usage of VReplication workflows with foreign keys.
    Implementation details are documented in the RFC for foreign keys.
  3. disallow -
    In this mode Vitess explicitly disallows any DDL statements that try to create a foreign key constraint. This mode is equivalent to running VTGate with the flag --foreign_key_mode=disallow.

In addition to query support, there is a new flag to MoveTables called --atomic-copy which should be used to import data into Vitess from databases which have foreign keys defined in the schema.

Upgrade process

After upgrading from v17 to v18, users should specify the correct foreign key mode for all their keyspaces in the VSchema using the new property.
Once this change has taken effect, the deprecated flag --foreign_key_mode can be dropped from all VTGates. Note that this is only required if running in disallow mode.
No action is needed to use unmanaged mode.

VTAdmin

vtadmin-web updated to node v18.16.0 (LTS)

Building vtadmin-web now requires node >= v18.16.0 (LTS). Breaking changes from v16 to v18 are listed
in https://nodejs.org/en/blog/release/v18, but none apply to VTAdmin. Full details on node v18.16.0 are listed
on https://nodejs.org/en/blog/release/v18.16.0.

Deprecations and Deletions

Legacy Client Binaries

vtctldclient is our new modern Vitess controller daemon (vtctld) client – which you will use to perform commands
and take actions in your Vitess clusters. It is replacing the legacy vtctl/vtctlclient binaries.
Some of the benefits are:

In Vitess 18 we have completed migrating all client commands to vtctldclient – the last ones being the OnlineDDL
and VReplication commands. With this work now completed, the
legacy vtctl/vtctlclient binaries are now fully deprecated and we plan to remove them in Vitess 19. You should
begin your transition before upgrading to Vitess 18.

Deprecated Command Line Flags

Throttler related vttablet flags:

  • --throttle_threshold is deprecated and will be removed in v19
  • --throttle_metrics_query is deprecated and will be removed in v19
  • --throttle_metrics_threshold is deprecated and will be removed in v19
  • --throttle_check_as_check_self is deprecated and will be removed in v19
  • --throttler-config-via-topo is deprecated after assu...
Read more

Vitess v18.0.0-rc1

03 Oct 14:24
6ab165a
Compare
Choose a tag to compare
Vitess v18.0.0-rc1 Pre-release
Pre-release

Release of Vitess v18.0.0-rc1

Summary

Table of Contents

Major Changes

Breaking Changes

Local examples now use etcd v3 storage and API

In previous releases the local examples were
explicitly using etcd v2 storage (etcd --enable-v2=true) and API (ETCDCTL_API=2) mode. We have now
removed this legacy etcd usage and instead use the new (default) etcd v3 storage and API. Please see
PR #13791 for additional info. If you are using the local
examples in any sort of long-term non-testing capacity, then you will need to explicitly use the v2 storage
and API mode or migrate your existing data from v2 to v3.

New command line flags and behavior

VTOrc flag --allow-emergency-reparent

VTOrc has a new flag --allow-emergency-reparent that allows the users to toggle the ability of VTOrc to run emergency
reparent operations. Users that want VTOrc to fix the replication issues, but don't want it to run any reparents
should start using this flag. By default, VTOrc will be able to run EmergencyReparentShard. Users must specify the
flag to false to change the behaviour.

VTOrc flag --change-tablets-with-errant-gtid-to-drained

VTOrc has a new flag --change-tablets-with-errant-gtid-to-drained that allows users to choose whether VTOrc should change the
tablet type of tablets with errant GTIDs to DRAINED. By default, it is disabled.

This feature allows users to configure VTOrc such that any tablet that encounters errant GTIDs is automatically taken out of the
serving graph. These tablets can then be inspected for what the errant GTIDs are, and once fixed, they can rejoin the cluster.

ERS sub flag --wait-for-all-tablets

Running EmergencyReparentShard from the vtctldclient has a new sub-flag --wait-for-all-tablets that makes EmergencyReparentShard wait
for a response from all the tablets. Originally EmergencyReparentShard was meant only to be run when a primary tablet is unreachable.
We have realized now that there are cases when the replication is broken but all the tablets are reachable. In these cases, it is advisable to
call EmergencyReparentShard with --wait-for-all-tablets so that it does not ignore one of the tablets.

VTGate GRPC stream execute session flag --grpc-send-session-in-streaming

This flag enables transaction support on StreamExecute api.
Once enabled, VTGate StreamExecute gRPC api will send session as the last packet in the response.
The client should enable it only when they have made the required changes to expect such a packet.

It is disabled by default.

Experimental Foreign Key Support

A new field foreignKeyMode has been added to the VSchema. This field can be provided for each keyspace. The VTGate flag --foreign_key_mode has been deprecated in favour of this field.

There are 3 foreign key modes now supported in Vitess -

  1. unmanaged -
    This mode represents the default behaviour in Vitess, where it does not manage foreign keys column references. Users are responsible for configuring foreign keys in MySQL in such a way that related rows, as determined by foreign keys, reside within the same shard.
  2. managed [EXPERIMENTAL] -
    In this experimental mode, Vitess is fully aware of foreign key relationships and actively tracks foreign key constraints using the schema tracker. Vitess takes charge of handling DML operations with foreign keys cascading updates, deletes and verifying restrict. It will also validate parent row existence.
    This ensures that all the operations are logged in binary logs, unlike MySQL implementation of foreign keys.
    This enables seamless integration of VReplication with foreign keys.
    For more details on what operations Vitess takes please refer to the design document for foreign keys.
  3. disallow -
    In this mode Vitess explicitly disallows any DDL statements that try to create a foreign key constraint. This mode is equivalent to running VTGate with the flag --foreign_key_mode=disallow.

Upgrade process

After upgrading from v17 to v18, the users should specify the correct foreign key mode for all their keyspaces in the VSchema using the new property.
Once this change has taken effect, the deprecated flag --foreign_key_mode can be dropped from all the VTGates.

VTAdmin

vtadmin-web updated to node v18.16.0 (LTS)

Building vtadmin-web now requires node >= v18.16.0 (LTS). Breaking changes from v16 to v18 are listed
in https://nodejs.org/en/blog/release/v18.0.0, but none apply to VTAdmin. Full details on v18.16.0 are listed
on https://nodejs.org/en/blog/release/v18.16.0.

Deprecations and Deletions

Deprecated Command Line Flags

Throttler related vttablet flags:

  • --throttle_threshold is deprecated and will be removed in v19.0
  • --throttle_metrics_query is deprecated and will be removed in v19.0
  • --throttle_metrics_threshold is deprecated and will be removed in v19.0
  • --throttle_check_as_check_self is deprecated and will be removed in v19.0
  • --throttler-config-via-topo is deprecated after assumed true in v17.0. It will be removed in a future version.

Cache related vttablet flags:

  • --queryserver-config-query-cache-lfu is deprecated and will be removed in v19.0. The query cache always uses a LFU implementation now.
  • --queryserver-config-query-cache-size is deprecated and will be removed in v19.0. This option only applied to LRU caches, which are now unsupported.

Buffering related vtgate flags:

  • --buffer_implementation is deprecated and will be removed in v19.0

Cache related vtgate flags:

  • --gate_query_cache_lfu is deprecated and will be removed in v19.0. The query cache always uses a LFU implementation now.
  • --gate_query_cache_size is deprecated and will be removed in v19.0. This option only applied to LRU caches, which are now unsupported.

VTGate flags:

  • --schema_change_signal_user is deprecated and will be removed in v19.0
  • --foreign_key_mode is deprecated and will be removed in v19.0. For more detail read the foreign keys section.

VDiff v1:

VDiff v2 was added in Vitess 15.0 and marked as GA in 16.0.
The legacy v1 client command is now deprecated in Vitess 18.0 and will be removed in 19.0.
Please switch all of your usage to the new VDiff client command ASAP.

Deprecated Stats

The following EmergencyReparentShard stats are deprecated in v18.0 and will be removed in v19.0:

  • ers_counter
  • ers_success_counter
  • ers_failure_counter

These metrics are replaced by new reparenting stats introduced in v18.0.

VTBackup stat DurationByPhase is deprecated. Use the binary-valued Phase stat instead.

Deleted Command Line Flags

Flags in vtcombo:

  • --vtctld_addr

Flags in vtctldclient ApplySchema:

  • --skip-preflight

Flags in vtctl ApplySchema:

  • --skip_preflight

Flags in vtgate:

  • --vtctld_addr

Flags in vttablet:

  • --vtctld_addr
  • --use_super_read_only
  • --disable-replication-manager
  • --init_populate_metadata
  • --queryserver-config-pool-prefill-parallelism
  • `-...
Read more

Vitess v17.0.3

03 Oct 14:42
dced85d
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.17.2...v17.0.3