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
--consul-auth-static-filerequires 1 or more credentialsEmergencyReparentShard-based recoveries/api/replication-analysisHTTP API deprecationtabletmanagerclient error changesMajor Changes
Breaking Changes
Deleted VTGate Metrics
Four deprecated VTGate metrics have been completely removed in v23.0.0. These metrics were deprecated in v22.0.0:
QueriesProcessedQueriesRoutedQueriesProcessedByTableQueriesRoutedByTableImpact: Any monitoring dashboards or alerting systems using these metrics must be updated to use the replacement metrics introduced in v22.0.0:
QueryExecutionsinstead ofQueriesProcessedQueryRoutesinstead ofQueriesRoutedQueryExecutionsByTableinstead ofQueriesProcessedByTableandQueriesRoutedByTableSee the v22.0.0 release notes for details on the new metrics.
ExecuteFetchAsDba No Longer Accepts Multi-Statement SQL
The
ExecuteFetchAsDbaRPC method in TabletManager now explicitly rejects SQL queries containing multiple statements (as of PR #18183).Impact: Code or automation that previously passed multiple semicolon-separated SQL statements to
ExecuteFetchAsDbawill now receive an error. Each SQL statement must be sent in a separate RPC call.Migration: Split multi-statement SQL into individual RPC calls:
gRPC TabletManager Error Code Changes
The
vttabletgRPCtabletmanagerclient now returns errors wrapped by the internalgo/vt/vterrorspackage (PR #18565).Impact: External automation relying on google-gRPC error codes must be updated to use
vterrors.Code(err)to inspect error codes, which returnsvtrpcpb.Codes defined in proto/vtrpc.proto.Migration:
GTID API Signature Changes
Several GTID-related API signatures changed in PR #18196 as part of GTID performance optimizations:
Changed:
BinlogEvent.GTID()method signatureImpact: Code directly using the GTID parsing APIs may need updates. Most users are unaffected as these are internal APIs.
GenerateShardRanges API Signature Change
The
key.GenerateShardRanges()function signature changed in PR #18633 to add a newhexChars intparameter controlling the hex width of generated shard names.Impact: Code calling
GenerateShardRanges()directly must be updated to pass the new parameter.The corresponding vtctldclient command gained a new
--charsflag to control this behavior.Flag Naming Convention Migration
Vitess v23.0.0 includes a major standardization of CLI flag naming conventions across all binaries. 989 flags have been migrated from underscore notation (
flag_name) to dash notation (flag-name) in PR #18280 and related PRs.Backward Compatibility
Automatic Normalization
Flag normalization happens automatically at the
pflaglevel (PR #18642), so both formats are accepted without requiring code changes in v23/v24.Example Flag Renames
Common flags affected (full list of 989 flags available in PR #18280):
Backup flags:
--azblob_backup_account_name→--azblob-backup-account-name--s3_backup_storage_bucket→--s3-backup-storage-bucket--xtrabackup_root_path→--xtrabackup-root-pathReplication flags:
--heartbeat_enable→--heartbeat-enable--replication_connect_retry→--replication-connect-retrygRPC flags (PR #18009):
Action Required
Users should update configuration files, scripts, and automation to use dash-based flag names before upgrading to v25.0.0. The migration is backward compatible in v23 and v24, allowing gradual updates.
New default versions
Upgrade to MySQL 8.4
The default major MySQL version used by our
vitess/lite:latestimage is going from8.0.40to8.4.6.This change was merged in #18569.
VTGate also advertises MySQL version
8.4.6by default instead of8.0.40. If that is not what you are running, you can set themysql_server_versionflag to advertise the desired version.New Support
Multi-Query Execution
Vitess v23.0.0 introduces native support for executing multiple queries in a single RPC call through new
ExecuteMultiandStreamExecuteMultiAPIs (PR #18059).This feature provides more efficient batch query execution without requiring manual query splitting or multiple round trips.
Usage Example:
Configuration: Enable with the
--mysql-server-multi-query-protocolflag on VTGate.Transaction Timeout Session Variable
A new
transaction_timeoutsession variable has been added (PR #18560), allowing per-session control over transaction timeout duration.Usage:
This provides more granular timeout control compared to global server settings, useful for:
Experimental: Query Throttler
Vitess v23.0.0 introduces a new, experimental Query Throttler framework for rate-limiting incoming queries (RFC issue #18412, PR #18449, PR #18657). Work on this new throttler is ongoing with the potential for breaking changes in the future.
Feedback on this experimental feature is appreciated in GitHub issues or the
#feat-handling-overloadchannel of the Vitess Community Slack.Features:
Configuration:
--query-throttler-config-refresh-interval- How often to reload throttler configurationDry-run Mode: Test throttling rules without actually blocking queries, useful for validating configuration before enforcement.
Multiple Lookup Vindexes Support
Creating multiple lookup vindexes in a single workflow is now supported through the
--params-fileflag (PR #17566).Usage:
# Create multiple lookup vindexes from JSON configuration vtctldclient LookupVindexCreate \ --workflow my_lookup_workflow \ --params-file /path/to/params.json \ commerceparams.json example:
{ "vindexes": [ { "name": "user_email_lookup", "type": "consistent_lookup_unique", "table_owner": "users", "table_owner_columns": ["email"] }, { "name": "user_name_lookup", "type": "consistent_lookup", "table_owner": "users", "table_owner_columns": ["name"] } ] }This significantly improves workflow efficiency when setting up multiple vindexes, reducing the number of separate operations required.
Reference Tables in Materialize Workflows
Reference tables can now be added to existing materialize workflows using the new
Materialize ... updatesub-command (PR #17804).Usage:
# Add reference tables to an existing workflow vtctldclient Materialize --workflow my_workflow update \ --add-reference-tables ref_table1,ref_table2 \ --target-keyspace my_keyspaceUse Case: Incrementally add reference tables to running materialize workflows without recreating the entire workflow, improving operational flexibility.
Online DDL Shard-Specific Completion
Online DDL migrations can now be completed on a per-shard basis using the new
COMPLETE VITESS_SHARDSsyntax (PR #18331).Usage:
Benefits:
WITH RECURSIVE CTEs
Vitess now supports
WITH RECURSIVEcommon table expressions (PR #18590), enabling recursive queries for hierarchical data.Example:
This is a major SQL compatibility enhancement for applications with hierarchical or graph-like data structures.
CREATE TABLE ... SELECT Support
The SQL parser now supports
CREATE TABLE ... SELECTstatements (PR #18443), improving MySQL compatibility.Example:
Deprecations
Metrics
vtorcDiscoverInstanceTimingsDiscoveryInstanceTimingsCLI Flags
As part of the Flag Naming Convention Migration, 989 CLI flags across all Vitess binaries have been deprecated in their underscore format. The dash format should be used going forward.
Deprecation Timeline:
Action Required: Migrate to dash-based flag names before v25.0.0. See Flag Naming Convention Migration for details.
Deletions
Metrics
vtgateQueriesProcessedv22.0.0vtgateQueriesRoutedv22.0.0vtgateQueriesProcessedByTablev22.0.0vtgateQueriesRoutedByTablev22.0.0See Breaking Changes for migration guidance.
New Metrics
VTGate
TransactionsProcessedShard,TypeOptimizedQueryExecutionsTransaction Types in
TransactionsProcessed:Single- Single-shard transactionsMulti- Multi-shard transactionsTwoPC- Two-phase commit transactionsUse Case: The
TransactionsProcessedmetric helps identify transaction patterns and shard distribution, useful for:VTTablet
OnlineDDLStaleMigrationMinutesvttablet_tablet_server_statetype,keyspace,shardUse Case for
OnlineDDLStaleMigrationMinutes: Alert on stalled Online DDL migrations that haven't progressed for an extended period, helping identify migrations that may need intervention.VTOrc
SkippedRecoveriesRecoveryName,Keyspace,Shard,ReasonEmergencyReparentShardDisabledKeyspace,ShardUse Case for
EmergencyReparentShardDisabled: Create alerts to ensure EmergencyReparentShard-based recoveries are not disabled for an undesired period, maintaining high availability posture.SkippedRecoveriesReasons: TheReasondimension tracks why recoveries were skipped (e.g., "ERSDisabled", "ReplicationLagHigh", "NotEnoughReplicas"), providing actionable insights for operational troubleshooting.Minor Changes
New CLI Flags
VReplication/Materialize
--params-file--type,--table-owner, and--table-owner-columns.--add-reference-tablesupdatesub-command.Observability
--skip-user-metrics--querylog-emit-on-any-condition-met--querylog-time-threshold--querylog-emit-on-any-condition-met.--grpc-enable-orca-metrics--datadog-trace-debug-modeVTOrc
--allow-recoveryUse Case: The
--allow-recovery=falseflag is useful for:Backup/Restore
--xtrabackup-should-drainCLI Tools
--charsGenerateShardRangescommand. Allows fine-grained control over shard naming.Example:
VTAdmin
Five new TLS-related flags were added for secure vtctld connections (PR #18556):
--vtctld-grpc-ca--vtctld-grpc-cert--vtctld-grpc-key--vtctld-grpc-server-name--vtctld-grpc-crlThese flags enable mTLS (mutual TLS) authentication between VTAdmin and vtctld for enhanced security.
VTGate
--vtgate-grpc-fail-fastModified Metrics
VTOrc Recovery Metrics Enhanced with Keyspace/Shard Labels
The following VTOrc recovery metrics now include
KeyspaceandShardlabels in addition to the existingRecoveryTypelabel (PR #18304):FailedRecoveriesPendingRecoveriesRecoveriesCountSuccessfulRecoveriesImpact: Monitoring queries and dashboards using these metrics may need updates to account for the additional label dimensions.
Benefits:
Example PromQL Query:
VTGate QueryExecutionsByTable Behavior Change
The
QueryExecutionsByTablemetric now only counts successful query executions (PR #18584). Previously, it counted all query attempts regardless of success/failure.Impact:
Parser/SQL Enhancements
Vitess v23.0.0 includes significant SQL parser improvements for better MySQL compatibility:
New SQL Syntax Support
CREATE TABLE ... SELECTWITH RECURSIVESET NAMES binaryALTER VITESS_MIGRATION ... POSTPONE COMPLETEVALUEkeyword in INSERT/REPLACEVALUE(singular) in addition toVALUESCREATE PROCEDURE Improvements
Enhanced
CREATE PROCEDUREstatement parsing (PR #18142, PR #18279):DEFINERclauses with various formatsBEGIN...ENDblocks andSTART TRANSACTIONstatementsSETstatements within procedure bodiesOperator Precedence Fixes
MEMBER OFoperator precedence withAND(PR #18237)Query Planning Improvements
Window Functions in Single-Shard Queries
Window functions can now be pushed down to single-shard queries (PR #18103), improving performance for analytics workloads.
Before v23: Window functions were always executed at VTGate level, even for single-shard queries.
After v23: Window functions are pushed down when the query targets a single shard, reducing data transfer and improving performance.
Example:
UNION Query Merging Improvements
UNION query optimization has been significantly enhanced (PR #18289, PR #18393):
Extended UNION Merging: UNION queries with
EqualandINopcodes can now be merged more aggressively, generating simpler SQL.Derived Table Elimination: Unnecessary derived table wrapping is avoided for UNION queries, producing cleaner and more efficient SQL.
Example:
Multi-Shard Read-Only Transactions in SINGLE Mode
Read-only transactions can now span multiple shards when using
SINGLEtransaction mode (PR #18173).Before v23: SINGLE mode restricted all transactions to single shards, even read-only ones.
After v23: Read-only transactions can access multiple shards in SINGLE mode, improving flexibility without sacrificing consistency guarantees.
Impact: Applications using SINGLE transaction mode can now perform multi-shard read queries within transactions without needing to upgrade to MULTI or TWOPC modes.
Deferred Optimization for Prepared Statements
Prepared statements now support deferred optimization (PR #18126), allowing preparation to succeed even when plan generation requires runtime values.
Benefits:
Behavior: When a prepared statement cannot be fully optimized at preparation time, optimization is deferred to execution time when bind variable values are available.
Query Buffering for INSTANT DDL
Query buffering has been implemented for
INSTANTDDL operations (PR #17945), reducing query failures during schema changes.Features:
Impact: Applications experience fewer query errors during schema changes, improving availability during DDL operations.
Topology
--consul-auth-static-filerequires 1 or more credentialsThe
--consul-auth-static-fileflag used in several components now requires that 1 or more credentials can be loaded from the provided json file ([PR ...View the full release notes at https://github.com/vitessio/vitess/releases/tag/v23.0.0.