Merged
Conversation
iMichka
approved these changes
Apr 29, 2025
Contributor
|
🤖 An automated task has requested bottles to be published to this PR. Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created by
brew bumpCreated with
brew bump-formula-pr.Details
release notes
--clusters_to_watchvitess/liteimages with Debian BookwormCREATE PROCEDUREsupportMajor Changes
Deprecations
Metrics
vtgateQueriesProcessedvtgateQueriesRoutedvtgateQueriesProcessedByTablevtgateQueriesRoutedByTableCLI Flags
vttablettwopc_enabletransaction_modeset on VTGate via flag or session variable.vtgategrpc-send-session-in-streamingDeletions
Metrics
vttabletQueryCacheLengthv21.0.0vttabletQueryCacheSizev21.0.0vttabletQueryCacheCapacityv21.0.0vttabletQueryCacheEvictionsv21.0.0vttabletQueryCacheHitsv21.0.0vttabletQueryCacheMissesv21.0.0CLI Flags
vttabletqueryserver-enable-settings-poolv21.0.0vttabletremove-sharded-auto-incrementv21.0.0vttabletdisable_active_reparentsv20.0.0vtgate,vtcombo,vtctldhealthcheck-dial-concurrencyv21.0.0gh-ost and pt-osc Online DDL strategies
Vitess no longer recognizes the
gh-ostandpt-osc(pt-online-schema-change) Online DDL strategies. Thevitessstrategy is the recommended way to make schema changes at scale.mysqlanddirectstrategies continue to be supported.These
vttabletflags have been removed:--gh-ost-path--pt-osc-pathAttempting to use
gh-ostorpt-oscas--ddl-strategywill yield an error:New Metrics
VTGate
QueryExecutionsQuery,Plan,TabletQueryRoutesQuery,Plan,TabletQueryExecutionsByTableQuery,TableVStreamsCountKeyspace,ShardName,TabletTypeVStreamsEventsStreamedKeyspace,ShardName,TabletTypeVStreamsEndedWithErrorsKeyspace,ShardName,TabletTypeCommitModeTimingsModeCommitUnresolvedThe work done in #17727 introduces new metrics for queries. Via this work we have deprecated several vtgate metrics, please see the Deprecated Metrics section. Here is an example of how the new metrics are calculated:
VTTablet
TableRowsTableTableClusteredIndexSizeTableIndexCardinalityTable,IndexIndexBytesTable,IndexUnresolvedTransactionManagerTypeCommitPreparedFailFailureTypeRedoPreparedFailFailureTypeConfig File Changes
VTOrc
VTOrc now supports dynamic configuration using viper. The old
--configparameter has been removed. Use the--config-fileparameter instead. Configuration can be provided in json, yaml or any other format that viper supports.The following fields can be dynamically changed -
instance-poll-timeprevent-cross-cell-failoversnapshot-topology-intervalreasonable-replication-lagaudit-to-backendaudit-to-syslogaudit-purge-durationwait-replicas-timeouttolerable-replication-lagtopo-information-refresh-durationrecovery-poll-durationallow-emergency-reparentchange-tablets-with-errant-gtid-to-drainedTo upgrade to the new version of the configuration file, first switch to using the flags in your current deployment before upgrading. Then you can switch to using the configuration file after upgrade.
VTGate
The Viper configuration keys for the following flags has been changed to match their flag names. Previously they had a discovery prefix instead of it being part of the name.
discovery_low_replication_lagdiscovery.low_replication_lagdiscovery_low_replication_lagdiscovery_high_replication_lag_minimum_servingdiscovery.high_replication_lag_minimum_servingdiscovery_high_replication_lag_minimum_servingdiscovery_min_number_serving_vttabletsdiscovery.min_number_serving_vttabletsdiscovery_min_number_serving_vttabletsdiscovery_legacy_replication_lag_algorithmdiscovery.legacy_replication_lag_algorithmdiscovery_legacy_replication_lag_algorithmTo upgrade to the newer version of the configuration keys, first switch to using the flags in your current deployment before upgrading. Then you can switch to using the new configuration keys after upgrade.
VTOrc
Stalled Disk Recovery
VTOrc can now identify and recover from stalled disk errors.
VTTablets test whether the disk is writable and they send this information in the
FullStatusRPC response to VTOrc.If the disk is not writable on the primary tablet, VTOrc will attempt to recover the cluster by promoting a new primary.
This is useful in scenarios where the disk is stalled and the primary vttablet is unable to accept writes because of it.
To opt into this feature,
--enable-primary-disk-stalled-recoveryflag has to be specified on VTOrc, and--disk-write-dirflag has to be specified on the vttablets.--disk-write-intervaland--disk-write-timeoutflags can be used to configure the polling interval and timeout respectively.KeyRanges in
--clusters_to_watchVTOrc now supports specifying keyranges in the
--clusters_to_watchflag. This means that there is no need to restart a VTOrc instance with a different flag value when you reshard a keyspace.For example, if a VTOrc is configured to watch
ks/-80, then it would watch all the shards that fall under the keyrange-80.If a reshard is performed and
-80is split into new shards-40and40-80, the VTOrc instance will automatically start watching the new shards without needing a restart.In the previous logic, specifying
ks/-80for the flag would mean that VTOrc would watch only 1 (or no) shard.In the new system, since we interpret
-80as a key range, it can watch multiple shards as described in the example.Users can continue to specify exact keyranges. The new feature is backward compatible.
New Default Versions
MySQL 8.0.40
The default major MySQL version used by our
vitess/lite:latestimage is going from8.0.30to8.0.40.This change was merged in #17552.
VTGate also advertises MySQL version
8.0.40by default instead of8.0.30. If that is not what you are running, you can set themysql_server_versionflag to advertise the desired version.Docker
vitess/liteimages with Debian BookwormThe docker build system now uses Debian Bookworm instead of Debian Bullseye for the
vitess/liteimages. This change was merged in #17552.New Support
More Efficient JSON Replication
In #7345 we added support for
--binlog-row-value-options=PARTIAL_JSON. You can read more about this feature added to MySQL 8.0 here.If you are using MySQL 8.0 or later and using JSON columns, you can now enable this MySQL feature across your Vitess cluster(s) to lower the disk space needed for binary logs and improve the CPU and memory usage in both
mysqld(standard intrashard MySQL replication) andvttablet(VReplication) without losing any capabilities or features.LAST_INSERT_ID(x)In #17408 and #17409, we added the ability to use
LAST_INSERT_ID(x)in Vitess directly at vtgate. This improvement allows certain queries—likeSELECT last_insert_id(123);orSELECT last_insert_id(count(*)) ...—to be handled without relying on MySQL for the final value.Limitations:
LAST_INSERT_ID(x)in ordered queries (e.g.,SELECT last_insert_id(col) FROM table ORDER BY foo), MySQL sets the session’s last-insert-id value according to the last row returned. Vitess does not guarantee the same behavior.Maximum Idle Connections in the Pool
In #17443 we introduced a new configurable max-idle-count parameter for connection pools. This allows you to specify the maximum number of idle connections retained in each connection pool to optimize performance and resource efficiency.
You can control idle connection retention for the query server’s query pool, stream pool, and transaction pool with the following flags:
• --queryserver-config-query-pool-max-idle-count: Defines the maximum number of idle connections retained in the query pool.
• --queryserver-config-stream-pool-max-idle-count: Defines the maximum number of idle connections retained in the stream pool.
• --queryserver-config-txpool-max-idle-count: Defines the maximum number of idle connections retained in the transaction pool.
This feature ensures that, during traffic spikes, idle connections are available for faster responses, while minimizing overhead in low-traffic periods by limiting the number of idle connections retained. It helps strike a balance between performance, efficiency, and cost.
Filtering Query logs on Error
The
querylog-modesetting can be configured toerrorto log only queries that result in errors. This option is supported in both VTGate and VTTablet.MultiQuery RPC in vtgate
New RPCs have been added to VTGate that allow users to pass multiple queries in a single sql string. The behavior is the same as that of MySQL: the RPCs will return multiple result sets in the same order as the queries until and unless an error is encountered. The new RPCs are
ExecuteMultiandStreamExecuteMulti.A new flag
--mysql-server-multi-query-protocolhas also been added that makes the server use this new implementation. This flag is set tofalseby default, so the old implementation is used by default. The new implementation is more efficient and allows for better performance when executing multiple queries in a single RPC call.Unsharded
CREATE PROCEDUREsupportUntil now Vitess didn't allow users to create procedures through VTGate. They had to be created by running a DDL directly against the underlying MySQL. In this release, we have started adding support for running
CREATE PROCEDUREstatements through VTGate for unsharded keyspaces. Not all constructs of procedures are currently supported in the parser, so there are still some limitations which will be addressed in future releases.Optimization
Prepared Statement
Prepared statements now benefit from Deferred Optimization, enabling parameter-aware query plans.
Initially, a baseline plan is created at prepare-time, and on first execution, a more efficient parameter-optimized plan is generated.
Subsequent executions dynamically switch between these plans based on input values, improving query performance while ensuring correctness.
New VtctldServer RPC
GetTransactionInfoRPC has been added toVtctldServerandTabletManagerClientinterfaces. These RPCs can be used to read the state of an unresolved distributed transaction. This can be useful in debugging what went wrong and how to fix the problem.Prefer not promoting a replica that is currently taking a backup
Emergency reparents now prefer to not promote replicas that are currently taking backups with a backup engine other than
builtin. Note that if there's only one suitable replica to promote, and it is taking a backup, it will still bepromoted.
For planned reparents, hosts taking backups with a backup engine other than
builtinare filtered out of the list ofvalid candidates. This means they will never get promoted - not even if there are no other candidates.
Note that behavior for
builtinbackups remains unchanged: a replica that is currently taking abuiltinbackup willnever be promoted, neither by planned nor by emergency reparents.
Semi-sync monitor in vttablet
Primary VTTablets now monitor the semi-sync status of their underlying MySQL instance .
We've observed cases where a brief network disruption can cause the primary to get stuck indefinitely waiting for semi-sync ACKs.
In rare scenarios, this can also block reparent operations and render the primary unresponsive.
More information can be found in the issues #17709 and #17749.
To address this, the primary VTTablets continuously monitor their semi-sync status. If the primary MySQL gets stuck waiting for semi-sync ACKs, the monitor generates synthetic writes to unblock it. If this fails, VTOrc is notified of the issue and it will initiate an emergency reparent operation.
The monitoring interval can be adjusted using the
--semi-sync-monitor-intervalflag, which defaults to 10 seconds.Wrapped fatal transaction errors
When a query fails while running in a transaction, due to the transaction no longer being valid (e.g. PRS, rollout, primary down, etc.), the original error is now wrapped in a
VT15001error.When a query produce a
VT15001error, VTGate will try to rollback and clear the transaction.Any new queries on the same connection will fail with a
VT09032error, until aROLLBACKis receivedto acknowledge that the transaction was automatically rolled back and cleared by VTGate.
VT09032is returned to clients to avoid applications blindly sending queries to VTGate thinking they are still in a transaction.This change was introduced by #17669.
Minor Changes
--topo_read_concurrencybehaviour changesThe
--topo_read_concurrencyflag was added to all components that access the topology and the provided limit is now applied separately for each global or local cell (default32).All topology read calls (
Get,GetVersion,ListandListDir) now respect this per-cell limit. Previous to this version a single limit was applied to all cell calls and it was not respected by many topology calls.VTTablet
CLI Flags
twopc_abandon_ageflag now supports values in the time.Duration format (e.g., 1s, 2m, 1h).While the flag will continue to accept float values (interpreted as seconds) for backward compatibility,
float inputs are deprecated and will be removed in a future release.
--consolidator-query-waiter-capflag to set the maximum number of clients allowed to wait on the consolidator. The default value is set to 0 for unlimited wait. Users can adjust this value based on the performance of VTTablet to avoid excessive memory usage and the risk of being OOMKilled, particularly in Kubernetes deployments.ACL enforcement and reloading
When a tablet is started with
--enforce-tableacl-configit will exit with an error if the contents of the file are not valid. After the changes made in #17485 the tablet will no longer exit when reloading the contents of the file after receiving a SIGHUP. When the file contents are invalid on reload the tablet will now log an error and the active in-memory ACLs remain in effect.VTAdmin
vtadmin-web updated to node v22.13.1 (LTS)
Building
vtadmin-webnow requires node >= v22.13.0 (LTS). Breaking changes from v20 to v22 can be found at https://nodejs.org/en/blog/release/v22.13.0 -- with no known issues that apply to VTAdmin.Full details on the node v20.12.2 release can be found at https://nodejs.org/en/blog/release/v22.13.1.
The entire changelog for this release can be found here.
The release includes 475 merged Pull Requests.
Thanks to all our contributors: @GrahamCampbell, @GuptaManan100, @L3o-pold, @akagami-harsh, @anirbanmu, @app/dependabot, @app/vitess-bot, @arthmis, @arthurschreiber, @beingnoble03, @c-r-dev, @corbantek, @dbussink, @deepthi, @derekperkins, @ejortegau, @frouioui, @garfthoffman, @gmpify, @gopoto, @harshit-gangal, @huochexizhan, @jeefy, @jwangace, @kbutz, @lmorduch, @mattlord, @mattrobenolt, @maxenglander, @mcrauwel, @mounicasruthi, @niladrix719, @notfelineit, @rafer, @rohit-nayak-ps, @rvrangel, @shailpujan88, @shanth96, @shlomi-noach, @siadat, @systay, @timvaillancourt, @twthorn, @vitess-bot, @vmg, @wiebeytec, @wukuai