vitess 18.0.0#153451
Merged
BrewTestBot merged 2 commits intoHomebrew:masterfrom Nov 6, 2023
BrewTestBot:bump-vitess-18.0.0
Merged
vitess 18.0.0#153451BrewTestBot merged 2 commits intoHomebrew:masterfrom BrewTestBot:bump-vitess-18.0.0
BrewTestBot merged 2 commits intoHomebrew:masterfrom
BrewTestBot:bump-vitess-18.0.0
Conversation
chenrui333
approved these changes
Nov 6, 2023
Contributor
|
🤖 An automated task has requested bottles to be published to this PR. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
--allow-emergency-reparent--change-tablets-with-errant-gtid-to-drained--wait-for-all-tablets--grpc-send-session-in-streamingV3plannerk8stopovtgrquery_analyzerPhasePhaseStatusMajor 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 nowremoved 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-reparentVTOrc has a new flag
--allow-emergency-reparentthat specifies whether VTOrc is allowed to run emergencyfailover 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
truewhich corresponds to the default behavior from prior releases.VTOrc flag
--change-tablets-with-errant-gtid-to-drainedVTOrc has a new flag
--change-tablets-with-errant-gtid-to-drainedthat allows users to choose whether VTOrc should change thetablet 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-tabletsvtctldclient command
EmergencyReparentShardhas a new sub-flag--wait-for-all-tabletsthat makesEmergencyReparentShardwaitfor a response from all the tablets. Originally
EmergencyReparentShardwas 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
EmergencyReparentShardwith--wait-for-all-tabletsso that it does not ignore any of the tablets.VTGate GRPC stream execute session flag
--grpc-send-session-in-streamingThis flag enables transaction support on VTGate's
StreamExecutegRPC API.When this is enabled,
StreamExecutewill 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
foreignKeyModehas been added to the VSchema. This field can be provided for each keyspace. The VTGate flag--foreign_key_modehas been deprecated in favor of this field.There are 3 foreign key modes now supported in Vitess -
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.
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
restrictconstraints 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.
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, 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_modecan be dropped from all VTGates. Note that this is only required if running indisallowmode.No action is needed to use
unmanagedmode.VTAdmin
vtadmin-web updated to node v18.16.0 (LTS)
Building
vtadmin-webnow requires node >= v18.16.0 (LTS). Breaking changes from v16 to v18 are listedin 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
vtctldclientis our new modern Vitess controller daemon (vtctld) client – which you will use to perform commandsand take actions in your Vitess clusters. It is replacing the legacy
vtctl/vtctlclientbinaries.Some of the benefits are:
that are used between
vtctldclientandvtctld– this offers clean separation of commands and makes it easier todevelop new features without impacting other commands. This also presents an API that other clients (both Vitess and
3rd party) can use to interface with Vitess.
pFlag,Cobra, andViper.This makes development easier while also offering a better UX. For example, this offers a way to use
configuration files with support for
dynamic configuration (see also).
removes a burden from developers while helping users by ensuring the docs are always correct and up-to-date.
In Vitess 18 we have completed migrating all client commands to
vtctldclient– the last ones being the OnlineDDLand VReplication commands. With this work now completed, the
legacy
vtctl/vtctlclientbinaries are now fully deprecated and we plan to remove them in Vitess 19. You shouldbegin your transition before upgrading to Vitess 18.
Deprecated Command Line Flags
Throttler related
vttabletflags:--throttle_thresholdis deprecated and will be removed inv19--throttle_metrics_queryis deprecated and will be removed inv19--throttle_metrics_thresholdis deprecated and will be removed inv19--throttle_check_as_check_selfis deprecated and will be removed inv19--throttler-config-via-topois deprecated after assumedtrueinv17. It will be removed in a future version.Cache related
vttabletflags:--queryserver-config-query-cache-lfuis deprecated and will be removed inv19. The query cache always uses a LFU implementation now.--queryserver-config-query-cache-sizeis deprecated and will be removed inv19. This option only applied to LRU caches, which are now unsupported.Buffering related
vtgateflags:--buffer_implementationis deprecated and will be removed inv19Cache related
vtgateflags:--gate_query_cache_lfuis deprecated and will be removed inv19. The query cache always uses a LFU implementation now.--gate_query_cache_sizeis deprecated and will be removed inv19. This option only applied to LRU caches, which are now unsupported.VTGate flags:
--schema_change_signal_useris deprecated and will be removed inv19--foreign_key_modeis deprecated and will be removed inv19. For more detail read the foreign keys section.VDiff v1:
VDiff v2 was added in Vitess 15 and marked as GA in 16.
The legacy v1 client command is now deprecated in Vitess 18 and will be removed in Vitess 19.
Please switch all of your usage to the new VDiff client command ASAP.
Deprecated Stats
The following
EmergencyReparentShardstats are deprecated inv18and will be removed inv19:ers_counterers_success_counterers_failure_counterThese metrics are replaced by new reparenting stats introduced in
v18.VTBackup stat
DurationByPhaseis deprecated. Use the binary-valuedPhasestat instead.Deleted Command Line Flags
Flags in
vtcombo:--vtctld_addrFlags in
vtctldclient ApplySchema:--skip-preflightFlags in
vtctl ApplySchema:--skip_preflightFlags in
vtgate:--vtctld_addrFlags in
vttablet:--vtctld_addr--use_super_read_only--disable-replication-manager--init_populate_metadata--queryserver-config-pool-prefill-parallelism--queryserver-config-stream-pool-prefill-parallelism--queryserver-config-transaction-pool-prefill-parallelism--queryserver-config-schema-change-signal-interval--enable-lag-throttlerFlags in
vtctld:--vtctld_show_topology_crud--durability_policyFlags in
vtorc:--lock-shard-timeout--orc_web_dirDeleted
v3plannerThe
Gen4planner has been the default planner since Vitess 14. Thev3planner was deprecated in Vitess 15 and has been removed in Vitess 18.Deleted
k8stopok8stopowas deprecated in Vitess 17, see vitessio/vitess#13298. It has now been removed.Deleted
vtgrvtgrwas deprecated in Vitess 17, see vitessio/vitess#13300. It has now been removed.Deleted
query_analyzerThe undocumented
query_analyzerbinary has been removed in Vitess 18, see vitessio/vitess#14054.New stats
VTGate Vindex unknown parameters
The VTGate stat
VindexUnknownParametersgauges unknown Vindex parameters found in the latest VSchema pulled from the topology.VTBackup
PhasestatIn v17, the
vtbackupstatDurationByPhasestat was added to measure the time spent byvtbackupin each phase. This stat turned out to be awkward to use in production, and has been replaced in v18 by a binary-valuedPhasestat.Phasereports a 1 (active) or a 0 (inactive) for each of the following phases:CatchupReplicationInitialBackupRestoreLastBackupTakeNewBackupTo calculate how long
vtbackuphas spent in a given phase, sum the 1-valued data points over time and multiply by the data collection or reporting interval. For example, in Prometheus:VTBackup
PhaseStatusstatPhaseStatusreports a 1 (active) or a 0 (inactive) for each of the following phases and statuses:CatchupReplicationphase has statusesStalledandStopped.Stalledis set to1when replication stops advancing.Stoppedis set to1when replication stops beforevtbackupcatches up with the primary.Backup and restore metrics for AWS S3
Requests to AWS S3 are instrumented in backup and restore metrics. For example:
VTCtld and VTOrc reparenting stats
New VTCtld and VTOrc stats were added to measure frequency of reparents by keyspace/shard:
emergency_reparent_counts- Number of timesEmergencyReparentShardhas been run. It is further subdivided by the keyspace, shard and the result of the operation.planned_reparent_counts- Number of timesPlannedReparentShardhas been run. It is further subdivided by the keyspace, shard and the result of the operation.Also, the
reparent_shard_operation_timingsstat was added to provide per-operation timings of reparent operations.VTTablet
New ResetSequences rpc
A new VTTablet RPC
ResetSequenceshas been added, which is being used byMoveTablesandMigratefor workflowswhere a
sequencetable is being moved (vitessio/vitess#13238). This has an impact on theVitess upgrade process from an earlier version if you need to use such a workflow before the entire cluster is upgraded.
Any MoveTables or Migrate workflow that moves a sequence table should only be run after all vitess components have been
upgraded, and no upgrade should be done while such a workflow is in progress.
New Dry-run/monitoring-only mode for the transaction throttler
A new CLI flag
--tx-throttler-dry-runto set the Transaction Throttler to monitoring-only/dry-run mode has been added.If the transaction throttler is enabled with
--enable-tx-throttlerand the new dry-run flag is also specified, thetablet will not actually throttle any transactions; however, it will increase the counters for transactions throttled
(
vttablet_transaction_throttler_throttled). This allows users to deploy the transaction throttler in production andgain observability on how much throttling would take place, without actually throttling any requests.
Docker Builds
Bookworm added and made default
Bookworm was released on 2023-06-10, and will be the new default base container for Docker builds.
Bullseye images will still be built and available as long as the OS build is current, tagged with the
-bullseyesuffix.Buster removed
Buster LTS supports will stop in June 2024, and Vitess 18 will be supported through October 2024.
To prevent supporting a deprecated buster build for several months after June 2024, we are preemptively
removing Vitess support for Buster.
Durability Policies
New Durability Policies
Two new built-in durability policies have been added in Vitess 18:
semi_sync_with_rdonly_ackandcross_cell_with_rdonly_ack.These policies are similar to
semi_syncandcross_cellrespectively, the only difference is thatrdonlytablets can also send semi-sync ACKs.The entire changelog for this release can be found here.
The release includes 420 merged Pull Requests.
Thanks to all our contributors: @GuptaManan100, @Juneezee, @L3o-pold, @adsr, @ajm188, @app/dependabot, @app/github-actions, @app/vitess-bot, @arvind-murty, @austenLacy, @brendar, @davidpiegza, @dbussink, @deepthi, @derekperkins, @ejortegau, @frouioui, @harshit-gangal, @hkdsun, @jfg956, @jspawar, @mattlord, @maxenglander, @mdlayher, @notfelineit, @olyazavr, @pbibra, @peterlyoo, @rafer, @rohit-nayak-ps, @shlomi-noach, @systay, @timvaillancourt, @vmg, @yields