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

17407 Коммитов

Автор SHA1 Сообщение Дата
Harshit Gangal f175158faf java: Bump SNAPSHOT version to 5.0-SNAPSHOT after Vitess release 4.0
Signed-off-by: Harshit Gangal <harshit.gangal@gmail.com>
2019-11-08 14:54:01 +05:30
Anthony Yeh 738c917d18
Don't recheck mysqld port if it was provided explicitly. (#5383)
At startup, we already avoid asking mysqld for its port if we were given
the port in DB configs. However, we would forget this port when we later
trigger a recheck of the MySQL port.

It's important to trust the port that was given to us because it might
be different from the port that mysqld is actually serving on, such as
in the case that the host we were given is actually a proxy.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-11-05 10:51:47 -08:00
Morgan Tocker 018ddae2cd
Merge pull request #5384 from BenMusch/benmusch/bootstrap-script-osx
Fix usage of arch to work on OSX
2019-11-05 08:23:32 -07:00
Sugu Sougoumarane 92f7d546f0
Merge pull request #5398 from planetscale/ss-use
mysql: handle db name correctly
2019-11-03 09:22:21 -08:00
Sugu Sougoumarane 501862ade1 mysql: handle db name correctly
Fixes #5206

The conn schemaname var can get set through a new connection
or a ComInitDB packet. However, a use statement bypasses this
mechanism and gets handled at the vtgate level. This causes
problems because schemaName in the connection disagrees with
TargetString in vtgate.

To fix this, the new scheme calls a new handler function: ComInitDB
every time schemaName is initialized or changed in the connection.
This way, the TargetString remains the authoritative source
for the current db name.

I couldn't write a test for this specific behavior change because
the mysql go client does not implement support for ComInitDB.
But I've verified the things generally work as expected.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-03 02:37:19 -08:00
Sugu Sougoumarane 2111a7036b
Merge pull request #5367 from planetscale/ss-vrepl-vdiff
vreplication: vdiff
2019-11-03 01:12:15 -07:00
Sugu Sougoumarane 1b8bece4fa vdiff: fix broken tabletmanagerdata_pb2.py
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 18:30:09 -07:00
Sugu Sougoumarane 7d8a08d6a6 vdiff: post-rebase fix
change test to handle new mastership rules

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 18:06:39 -07:00
Sugu Sougoumarane 81afa30310 vreplication: re-introduce healthcheck timeouts
Some tests still depend on the healthcheck timeout options.
So, tablet picker still needs to accept them as arguments.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 357d070aa7 vdiff: handle aggregates
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 98429a9bc3 vdiff: fix two bugs
* WaitForPos previously worked only for replicas. It's been
  updated to work correctly for masters also.

* resultReader keyspace was hardcoded to source. The keyspace
  name is now passed as input param.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 78babddadd vdiff: vtctl command
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 3891247a15 vdiff: filteredReplicationWaitTime
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 7139502dc8 vdiff: rest of the tests
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 38c2ae96b2 vdiff: test framework with a basic test
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 65a0051333 vdiff: all plan builder tests
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 8e231daa49 vdiff: main function and start of testing
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 798fedbb38 vdiff: diff function
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 51ce2c57b0 vdiff: resultReader that uses engine.MergeSort
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 3a9aa89484 vdiff: syncTargets and restartTargets
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane d37fd4fa06 vdiff: streamFromSources
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane ea2a5c0800 vdiff: selectTablets
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:53 -07:00
Sugu Sougoumarane 2ef29629d7 tabletmanager: WaitForPosition
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:35:51 -07:00
Sugu Sougoumarane 297c5d1cc4 vdiff: new data structures
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane 3bdafdebdb discovery: improve TabletPicker algorithm
It now picks equally from all tablet types.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane d6063d9a1c discovery: refactor TabletPicker
It now waits indefinitely until at least one tablet is available.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane c6b7e30499 vreplication: use discovery.TabletPicker
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane c581f0e314 discovery: move tabletpicker from vreplication
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane c6994e5acd vdiff: stopTargetStreams, waitForSourceStreams
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane 0f608e9203 vdiff: resultStreamer test
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane cd858ac621 vdiff: resultStreamer
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane 8b6eb63f78 vdiff: add a test
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane ee052a5ba9 vdiff: planbuilder initial cut
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:13 -07:00
Sugu Sougoumarane 2083acea37 mysqlctl: GetSchema also returns field info
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-11-02 17:34:11 -07:00
Sugu Sougoumarane 7afc5eea4c
Merge pull request #5391 from vitessio/reparent-refactor
Make reparents more robust
2019-11-02 17:29:56 -07:00
Anthony Yeh 9a09f820bc
PlannedReparentShard: Fix more known-recoverable problems. (#5376)
* PlannedReparentShard: Fix more known-recoverable problems.

PlannedReparentShard should be able to fix replication as long as all
tablets are reachable and all replication positions are in a
mutually-consistent state.

PRS also no longer trusts that the shard record contains up-to-date
information on the master, because we update that record asynchronously
now. Instead, it looks at MasterTermStartTime values stored in each
master tablet's record, so it makes the same choice of master as
vtgates.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>

* PlannedReparentShard: Add -lag_threshold flag.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>

* Fix expected error in reparent test.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>

* PRS: Add test case for graceful recovery.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>

* PRS: Measure replication progress instead of lag.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-10-31 12:39:03 -07:00
Ben Muschol 5f5e33b53a Fix usage of arch to work on OSX
On OS X, the arch command returns "i386". However, "uname -m"
returns x86_64, which is the value the rest of the bootstrap.sh script
expects. This commit writes a function "get_arch" to wrap the "arch"
command, which calls uname on OS X and arch on Linux

Signed-off-by: Ben Muschol <ben.muschol@airbnb.com>
2019-10-31 11:26:27 -07:00
Deepthi Sigireddi 0603e64b78
Merge pull request #5380 from planetscale/ds-repl-pos-len
Change local_metadata.value to MEDIUMBLOB
2019-10-30 17:14:01 -07:00
deepthi 6c6a70a70b Change local_metadata.value to MEDIUMBLOB to accomodate long replication positions.
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-10-30 14:11:28 -07:00
Anthony Yeh e8dd5a4f08 Merge branch 'master' into reparent-refactor
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-10-30 12:44:51 -07:00
Anthony Yeh 6aeb071877
Don't set RestorePosition in local_metadata. (#5379)
This temporarily stops setting the RestorePosition in local_metadata
because the table's value column is not big enough to fit typical
replication positions, and therefore tablets are blocked from restoring.

We plan to re-enable RestorePosition after altering the local_metadata
table to make the value column big enough.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-10-30 11:02:27 -07:00
Sugu Sougoumarane bd1e8765cd
Merge pull request #5372 from vitessio/dependabot/pip/examples/kubernetes/guestbook/flask-1.0
Bump flask from 0.12.3 to 1.0 in /examples/kubernetes/guestbook
2019-10-29 11:31:02 -07:00
dependabot[bot] 210bfd3744
Bump flask from 0.12.3 to 1.0 in /examples/kubernetes/guestbook
Bumps [flask](https://github.com/pallets/flask) from 0.12.3 to 1.0.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/0.12.3...1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-29 16:23:24 +00:00
Sugu Sougoumarane d6b3300c83
Merge pull request #5370 from vitessio/dependabot/pip/test/cluster/keytar/flask-1.0
Bump flask from 0.12.3 to 1.0 in /test/cluster/keytar
2019-10-29 09:22:18 -07:00
dependabot[bot] fed4854260
Bump flask from 0.12.3 to 1.0 in /test/cluster/keytar
Bumps [flask](https://github.com/pallets/flask) from 0.12.3 to 1.0.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/0.12.3...1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-29 13:36:13 +00:00
Deepthi Sigireddi 789a0e3c3e EmergencyReparentShard does not need to update shard master, new master will do it (#5363)
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-10-28 16:49:52 -07:00
Sugu Sougoumarane 4198bee315
Merge pull request #5347 from planetscale/ss-vrepl-cancel-migrate
migrater: option to cancel a migration
2019-10-27 19:16:39 -07:00
Sugu Sougoumarane 7a6f6b7686 migrater: address review comments
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-10-27 17:46:16 -07:00
Sugu Sougoumarane 7fe2a70f04
Merge pull request #5366 from planetscale/morgo-small-config-refactor
Implement a small subset of config file refactor
2019-10-27 17:43:02 -07:00
Sugu Sougoumarane 39e45a606c
Merge pull request #5364 from yuxiaobo96/vitess-license9
add license in other files
2019-10-27 17:40:49 -07:00