Граф коммитов

22690 Коммитов

Автор SHA1 Сообщение Дата
Harshit Gangal c1f79617e7
[15.0] Send errors in stream instead of a grpc error from streaming rpcs when transaction or reserved connection is acquired (#11687)
* Fix ordering when error happens during stream setup (#11592)

* Fix ordering when error happens during stream setup

When we already have an error during the stream setup, that errors needs
to be returned immediately.

Otherwise the stream will already be started and the error message is
never returned to the client and it silently looks like a success even
if it's a failure.

This in turn can result in an empty result for example when an error
would have been expected.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Add a bunch of testing to verify stream execute behavior

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Send errors in stream instead of a grpc error from streaming rpcs when transaction or reserved connection is acquired (#11656)

* wip

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* feat: send errors in stream instead of a grpc error from streaming rpcs

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>
2022-11-11 14:39:35 +05:30
vitess-bot[bot] 5fe3d63440
[release-15.0] [bugfix] Allow VTExplain to handle shards that are not active during resharding (#11640) (#11652)
* VTexplain topology only uses serving shards

This addresses isse #11632 , which
causes vtexplain to sometimes give bad results if the keyspace is being
resharded, because sometimes it picks source shards and other times target
shards, for routing the query.

The issue is that the `VTExplain.buildTopolog()` adds both source and
destination shards to the map that holds shards per keyspace, when only one of
them is actually serving traffic at any point in time. Later on, vtexplain
loops over this map. Because looping over the map gives a non-deterministic
order, sometimes the results are correct, and sometimes incorrect - that is,
sometimes it gives the result of the shard that is serving, and other times,
the shard that is not serving.

This change ensures that only the serving shards are added to the shards per
keyspace map, thus avoiding the incorrect vtexplain.

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>

* This addresses issue #11632 , which
causes vtexplain to sometimes give bad results if the keyspace is being
resharded, because sometimes it picks source shards and other times target
shards, for routing the query.

The issue is that the VTExplain.buildTopolog() adds both source and
destination shards to the map that holds shards per keyspace, when only one of
them is actually serving traffic at any point in time. Later on, vtexplain
loops over this map. Because looping over the map gives a non-deterministic
order, sometimes the results are correct, and sometimes incorrect - that is,
sometimes it gives the result of the shard that is serving, and other times,
the shard that is not serving.

This change ensures that only the serving shards are added to the shards per
keyspace map, thus avoiding the incorrect vtexplain.

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>

* Fix check_make_vtadmin_authz_testgen

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>

* empty commit to trigger CI

Signed-off-by: Andres Taylor <andres@planetscale.com>

Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Co-authored-by: Andres Taylor <andres@planetscale.com>
2022-11-10 19:14:21 +01:00
FlorentP 039bb128c0
[release-15.0] Do not multiply `AggregateRandom` in JOINs (#11672)
* Do not multiply `AggregateRandom` in `JOIN`s (#11633)

* Do not multiply AggregateRandom in JOIN

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Update the releases notes with new known issue

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Addition of the release notes for v15.0.1

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Fix format issue in the release notes summary

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* set sql mode in TestAggregateRandom

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2022-11-09 14:18:07 -05:00
vitess-bot[bot] 910df9b589
Fix missing flag usage (#11583)
Signed-off-by: Matt Lord <mattalord@gmail.com>

Signed-off-by: Matt Lord <mattalord@gmail.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>
2022-10-26 19:51:33 -04:00
Rameez Sajwani 3efbc33847
Back to dev mode (#11574)
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Florent Poinsard <florent.poinsard@outlook.fr>
2022-10-25 22:58:14 +02:00
Rameez Sajwani 9b901a1d64
Release of v15.0.0 (#11573)
* Release notes for 15.0.0

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Release commit for 15.0.0

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
2022-10-25 19:30:22 +02:00
vitess-bot[bot] df77bcf10d
Detect redo log location dynamically based on presence (#11558)
Instead of relying on a specific version check, detect if the new redo
log location is present or not.

This makes the backup logic independent from the version check against
MySQL. With this change, 8.0.30 can be backed up just as well as any
other version.

Solves the backup part of
https://github.com/vitessio/vitess/issues/11554 by removing the
dependency on the version check. There might be still other places where
that issue can crop up, but it solves the immediate breaking issue with
backups.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: Dirkjan Bussink <d.bussink@gmail.com>
2022-10-21 14:42:33 -07:00
Manan Gupta 6b2208beda
[15.0] Deprecate InitShardPrimary command (#11557)
* feat: deprecate initshardprimary

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: add summary docs

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: deprecate the correct command

Signed-off-by: Manan Gupta <manan@planetscale.com>

* test: fix expected output

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
2022-10-21 14:38:43 -07:00
Rohit Nayak 4848d696b6
Test flags: Update logic for parsing test flags to run unit tests within GoLand and to parse test flags in vtgate to allow running unit tests (#11551)
* Update logic for parsing test flags to run unit tests within GoLand. Parse test flags in vtgate to allow running unit tests

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Minor changes after self-review

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

Signed-off-by: Rohit Nayak <rohit@planetscale.com>
2022-10-21 13:44:35 +05:30
Rameez Sajwani 19527a609b
Removing redundant flags across binaries (#11522)
* removing redundant flags across binaries

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* adding app pool flag back for some binaries

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* running generate_ci on prscomplex.yml

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* code review

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing markdeprecated error

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* code feedback

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* doing some minor changes

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing typo

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
2022-10-20 10:58:40 -07:00
FlorentP 2e243048c7
Redact bind variables in mysql errors (#11540)
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2022-10-20 13:09:40 +02:00
FlorentP 4f125f3d64
Fix `HAVING` rewriting made in #11306 (#11515) (#11526)
* don't rewrite HAVING predicates that use table columns

Signed-off-by: Andres Taylor <andres@planetscale.com>

* Revert the changes made in #11306

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Andres Taylor <andres@planetscale.com>

* Fix early rewriter test

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Andres Taylor <andres@planetscale.com>

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Andres Taylor <andres@planetscale.com>
2022-10-20 13:04:26 +02:00
Harshit Gangal c2c9137547
[15.0] Fix: concatenate engine in transaction (#11534)
* test: added failing e2e test

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* fix: sequence execution of concate engine when in transaction

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* fix: concatenate fix for olap transaction

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* fix: test race

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
2022-10-19 17:33:17 +05:30
Harshit Gangal f453661eb2
Fix #11455 - skip vindex operations for `DELETE` statements against unsharded tables (#11461) (#11530)
* Only perform vindex logic for deletes against sharded keyspaces.

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>

* Add a testcase covering deletes on an unsharded reference table.

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>

* Check if target keyspace is unsharded instead of checking opcode.

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>
2022-10-19 13:07:46 +05:30
Manan Gupta fb9e17864a
Properly deprecate flags and fix default for `--cell` (#11501)
* feat: fix default for cell flag in vtgate

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: deprecate --enable-query-plan-field-caching and --enable_query_plan_field_caching properly

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: properly deprecate prefill flags

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: properly deprecate filtered_replication_wait_time flag in switch writes

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
2022-10-18 18:33:48 -07:00
Andrew Mason bd35ac6f6c
Allow version to be accessible via the -v shorthand (#11512) (#11528)
* Allow version to be accessible via the -v shorthand

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* update help text

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* fix nonidempotence for tests

Signed-off-by: Andrew Mason <andrew@planetscale.com>

Signed-off-by: Andrew Mason <andrew@planetscale.com>

Signed-off-by: Andrew Mason <andrew@planetscale.com>
2022-10-18 16:27:33 -07:00
Frances Thai dab32ddc55
[VTAdmin] Cherry Pick Topology Browser (#11518)
* Add web side of topology components

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add GetTopologyPath

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add protos

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add comment explaining why name is not needed at toplevel topo path

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add GetTopologyPath to vtadmin

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Modify node code for non recursive

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Update logic for GetTopologyPath

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Render correct depth for nodes

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add tests TestGetTopologyPath

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add GetTopologyPath command

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run lint prettier fix

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Consolidate DecodeContent to vt/topo package - can't put in vt/topo/topoproto because of import cycle

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add rbac check for TopologyResource

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Update DecodeContent of zkcmd.go

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Update help text

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run make proto again

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run lint prettier fix

Signed-off-by: notfelineit <notfelineit@gmail.com>

Signed-off-by: notfelineit <notfelineit@gmail.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Florent Poinsard <florent.poinsard@outlook.fr>
2022-10-18 16:14:30 -07:00
Harshit Gangal 221efebf20
[15.0] fix: fail over reconnect in stream execution for connection with transaction (#11527)
* fix: stream exec once in case of transactional connection

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* test: added e2e test

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* generate ci worflow

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
2022-10-18 17:42:09 +05:30
vitess-bot[bot] 52c36e6e1f
Do not backtick binary name (#11481)
I accidentally stumbled over the behavior outlined in
`flag.PrintDefaults` [1], which `pflag` replicates, specifically:

> The listed type, here int, can be changed by placing a back-quoted
> name in the flag's usage string; the first such item in the message is
> taken to be a parameter name to show in the message and the back quotes
> are stripped from the message when displayed.

[1]: https://pkg.go.dev/flag#PrintDefaults.

Signed-off-by: Andrew Mason <andrew@planetscale.com>

Signed-off-by: Andrew Mason <andrew@planetscale.com>
Co-authored-by: Andrew Mason <andrew@planetscale.com>
2022-10-17 14:57:44 -04:00
Rameez Sajwani d0d9831831
remove excessive logging (#11479)
* remove excessive logging

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* code feeback

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing typo

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
2022-10-15 10:37:44 -07:00
Harshit Gangal 1047f7e14c
Merge pull request #11506 from planetscale/15-cp-11309
[15.0] Fix query list override issue on mysql restart (#11309)
2022-10-15 21:34:23 +05:30
Rameez Sajwani 3160c294dc
removing unncessary flags across binaries (#11495)
* removing unncessary flags across binaries

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* code review feedback

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing blank space

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
2022-10-14 19:08:38 -07:00
Rameez Sajwani b2a654cd49
Adding deprecate message to backup hooks (#11491)
* Adding deprecate message to backup hooks

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* adding markdeprecated

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing deprecation message

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing messaging

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fix flag name

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>
2022-10-14 16:04:25 -07:00
FlorentP fbacb8f9df
Upgrade to go1.18.7 (#11507)
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2022-10-14 10:14:13 -07:00
Manan Gupta e7a76ccd5f
[15.0] Fix VTOrc to handle multiple failures (#11489)
* feat: added test for vtorc not being able to handle mutliple failures and fix it

Signed-off-by: Manan Gupta <manan@planetscale.com>

* test: fix code to delete rdonly tablet from the correct list

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
2022-10-14 09:17:13 -07:00
Harshit Gangal c8f87b643c Fix query list override issue on mysql restart (#11309)
* test: added failing e2e test

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* log txID and reserveID in stream execute

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* fix: maintain list of qd per key on the map and check for current connection id while removing

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

* added additional comments

Signed-off-by: Harshit Gangal <harshit@planetscale.com>

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
2022-10-14 17:19:54 +05:30
Andres Taylor 11168e5c78
planner fix: using self-referencing columns in HAVING should not stack overflow (#11499)
Signed-off-by: Andres Taylor <andres@planetscale.com>

Signed-off-by: Andres Taylor <andres@planetscale.com>
2022-10-14 15:54:14 +05:30
FlorentP c44c56fce4
Plan order by `COUNT(X)` (#11420) (#11497)
* Plan order by Count()

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Clean up the new aggregation E2E test

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Push more order by needs to the select list

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* Remove unrequired code in TestOrderByCount

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* remove unwanted directory

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2022-10-14 12:20:54 +02:00
Harshit Gangal e5dbc203c2 test: added e2e test
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
2022-10-14 09:51:19 +00:00
Harshit Gangal 72993ea1f2 fix: reserve connection to follow query timeout when outside of transaction
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
2022-10-14 09:50:19 +00:00
FlorentP de606b6433
Skip TestComparisonSemantics (#11474) (#11475)
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2022-10-13 09:25:34 +02:00
vitess-bot[bot] bd8d5c8577
[release-15.0] [VTAdmin] `Validate`, `ValidateShard`, `ValidateVersionShard`, `GetFullStatus` (#11438) (#11452)
* Add validate

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add validate to cluster page

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run lint prettier fix

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add UI for validate shard

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add validateShard

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run make web proto

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Refactor validation results and implement validateShard

Signed-off-by: notfelineit <notfelineit@gmail.com>

* add http shards

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add GetFullStatus

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add keys and comment

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run lint prettier fix

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add ValidateVersionShard to vtctldclient

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add ValidateVersionShard

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Update test for vtctldclient

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Add test for ValidateVersionShard

Signed-off-by: notfelineit <notfelineit@gmail.com>

* run lint prettier fix again

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Modify during 1:1 with gomez

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Run lint prettier fix

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Address PR review comments

Signed-off-by: notfelineit <notfelineit@gmail.com>

* Update indentation

Signed-off-by: notfelineit <notfelineit@gmail.com>

Signed-off-by: notfelineit <notfelineit@gmail.com>
Co-authored-by: notfelineit <notfelineit@gmail.com>
2022-10-12 11:47:15 +02:00
Andres Taylor 8ef3ad0f0b
Use JSON for plan tests (#11430) (#11432)
* Use JSON for plan tests

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

* move vschemas into single directory

Signed-off-by: Andres Taylor <andres@planetscale.com>

* indentation

Signed-off-by: Andres Taylor <andres@planetscale.com>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: Andres Taylor <andres@planetscale.com>

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Co-authored-by: FlorentP <35779988+frouioui@users.noreply.github.com>
2022-10-10 16:30:52 +02:00
Rohit Nayak 3ec636f719
Include stats flags in servenv so that those flags are included in the correct binary. (#11450)
Signed-off-by: Rohit Nayak <rohit@planetscale.com>

Signed-off-by: Rohit Nayak <rohit@planetscale.com>
2022-10-06 22:31:25 +02:00
Matt Lord d1568f5304
For partial MoveTables, setup reverse shard routing rules on workflow creation (#11415) (#11447)
* Testing....

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Setup reverse routing rules at the start of the first partial movetables. Enhance e2e test to test for this as well as switch the remaining shard so that all shards are switched

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Update display representation of state for partially moved keyspaces

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Test improvements

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Cleanup shard routing rules on cancel/complete

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Cleanup intermediate changes

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Fix DryRun TrafficSwitcher and its tests

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Support concurrent partial movetables for N keyspaces

And other minor changes after self review

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Avoid unnecessary save + rebuild steps

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Add secondary ordering for shard routing rules on to_keyspace

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Minor changes after self review

Signed-off-by: Matt Lord <mattalord@gmail.com>

Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Co-authored-by: Rohit Nayak <rohit@planetscale.com>

Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Co-authored-by: Rohit Nayak <rohit@planetscale.com>
2022-10-06 13:17:11 -04:00
vitess-bot[bot] 74cf0dd611
[release-15.0] Fix VTOrc holding locks after shutdown (#11442) (#11448)
* feat: call the logic for waiting for shard locks on synchronous on-term hooks and add tests for it

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: fix comment for acceptSighupSignal function

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>
2022-10-06 14:44:31 +05:30
Rameez Sajwani ddf0620350
Back to dev mode (#11444)
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
2022-10-05 21:35:54 +02:00
Rameez Sajwani be10ffbcd3
Release of v15.0.0-rc1 (#11443)
* Release notes for 15.0.0-rc1

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Release commit for 15.0.0-rc1

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
2022-10-05 19:15:25 +02:00
Matt Lord 07387b872f
VDiff: Make restarting VReplication workflow more robust (#11413)
* When restarting workflow, use new context

Otherwise the restart will also fail due to the
expired/canceled context:
E0929 14:06:08.618848   85788 vdiff.go:247] Could not restart workflow commerce2customer: rpc error: code = Canceled desc = context canceled, please restart it manually
E0929 14:06:08.619983   85788 vtctl.go:2630] vdiff returning with error: rpc error: code = Canceled desc = context canceled

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Add retry when restarting workflows on ephemeral errors

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Correct mistake that prevented compilation :face-palm:

Signed-off-by: Matt Lord <mattalord@gmail.com>

Signed-off-by: Matt Lord <mattalord@gmail.com>
2022-10-03 15:24:00 -07:00
Dirkjan Bussink e93e19708b
Move towards MySQL 8.0 as the default template generation (#11153)
* Move towards MySQL 8.0 as the default template generation

This upgrades the remaining things to Ubuntu 20.04 and makes MySQL 8.0
the default we run tests against. We still have tests for MySQL 5.7 but
those are now explicitly opted into.

This should finish up the Ubuntu 20.04 upgrade and also makes things
easier for the future when we need to upgrade again.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* CI: rename shard vtorc_8.0 to vtorc_5.7, change expected test output for 8.0

Signed-off-by: deepthi <deepthi@planetscale.com>

* CI: increase timeout for 8.0 tests on the actual test step from 30 to 45 mins

Signed-off-by: deepthi <deepthi@planetscale.com>

* CI: increase timeout to 45 minutes for mysql57 tests too. We really only need this for vtorc, but I've made the change to the template so all tests get it.

Signed-off-by: deepthi <deepthi@planetscale.com>

* CI: fix vtorc test to work with both 5.7 and 8.0

Signed-off-by: deepthi <deepthi@planetscale.com>

* CI: missed docker flag in mysql57 template, one more fix to vtorc test

Signed-off-by: deepthi <deepthi@planetscale.com>

* removing spaces from pb file

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* removing spaces in pb file part 2

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
Co-authored-by: deepthi <deepthi@planetscale.com>
Co-authored-by: Rameez Sajwani <rameezwazirali@hotmail.com>
2022-10-03 14:04:57 -07:00
Andrew Mason 68e5398008
[cli] [vtctl] Migrate all vtctl commands to `pflag` (#11320)
* [cli] [vtctl] Migrate all vtctl commands to `pflag`

Closes #11304.

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* fix test flags

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* Handle subflag argument parsing without fully moving to cobra (yet!)

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* update examples

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* strip off double-dash

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* Fix pflag getting tripped on shard 0 bounded shard names

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* remove commented-out code

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* update release notes

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* fix ExecuteHook, which takes no flags

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* add deprecation notice around interspersal

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* fix flags for vtctld2 web calls

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* Run make web_build

Signed-off-by: notfelineit <notfelineit@gmail.com>

* test: fix vtctld_web_test

Signed-off-by: deepthi <deepthi@planetscale.com>

* update test assertions

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* just double-dash everything

Signed-off-by: Andrew Mason <andrew@planetscale.com>

* Run make web_build

Signed-off-by: notfelineit <notfelineit@gmail.com>

Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: notfelineit <notfelineit@gmail.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Co-authored-by: notfelineit <notfelineit@gmail.com>
Co-authored-by: deepthi <deepthi@planetscale.com>
2022-10-03 10:21:31 -07:00
Manan Gupta 31fb403759
feat: add a function to get the flag set for a given command (#11424)
Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
2022-10-03 10:21:05 -07:00
Andrew Mason 4a31b91391
Remove duplicated vt/log import (#11423)
Signed-off-by: Andrew Mason <andrew@planetscale.com>

Signed-off-by: Andrew Mason <andrew@planetscale.com>
2022-10-03 20:13:34 +05:30
Max Englander 55695d155f
expose vtbackup stats at --port /metrics (#11388)
* expose /metrics from vtbackup http --port

Signed-off-by: Max Englander <max@planetscale.com>

* -mathrand seed

Signed-off-by: Max Englander <max@planetscale.com>

Signed-off-by: Max Englander <max@planetscale.com>
2022-10-03 19:55:33 +05:30
Andres Taylor 4342564603
fix: do not rewrite single columns in derived tables (#11419)
Signed-off-by: Andres Taylor <andres@planetscale.com>

Signed-off-by: Andres Taylor <andres@planetscale.com>
2022-10-03 12:42:40 +02:00
Harshit Gangal c7116c9075
test: deflake TestIdleTimeoutCreateFail (#11411)
Signed-off-by: Harshit Gangal <harshit@planetscale.com>

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
2022-10-03 13:04:53 +05:30
Manan Gupta afda8928cd
VTOrc Standardisation and Cleanup (#11416)
* feat: remove unused package

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: replace usage of external test package with require

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: replace using external copied dependency with actual dependency

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: remove unused external package

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
2022-10-03 11:57:44 +05:30
Rohit Nayak 958d5954d2
[cli] Topo: Migrate zk2topo and k8stopo to pflag (#11401)
* Migrate zk2topo and k8stopo to pflag

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Update flags help output

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Fix failing tests

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Fix help text output

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Fix help output

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Fix help text output

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Add vtorc to topo binaries

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Define k8stopo flags on all topo binaries. Change way flags are defined for tests

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

* Update test help output files

Signed-off-by: Rohit Nayak <rohit@planetscale.com>

Signed-off-by: Rohit Nayak <rohit@planetscale.com>
2022-10-02 22:52:49 +02:00
Manan Gupta c9f018b49c
feat: fix vtbackup binary by adding the flags it needs (#11417)
Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
2022-10-01 20:43:40 +05:30
Deepthi Sigireddi 3f73bdb7b0
flags etc: delete old flags and stats, add deprecation notice to release notes (#11402)
* flags etc: delete old flags and stats, add deprecation notice to release notes

Signed-off-by: deepthi <deepthi@planetscale.com>

* vrepl: fix tests to run SwitchReads with tablet_types flag instead of deprecated tablet_type

Signed-off-by: deepthi <deepthi@planetscale.com>

* pitr: fix tests to run SwitchReads with tablet_types flag instead of deprecated tablet_type

Signed-off-by: deepthi <deepthi@planetscale.com>

Signed-off-by: deepthi <deepthi@planetscale.com>
2022-10-01 13:04:31 +02:00