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

799 Коммитов

Автор SHA1 Сообщение Дата
deepthi ac3efb4072 Replace keyspace_type in vschema with a boolean require_explicit_routing
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-10-06 12:23:42 -07:00
deepthi 060f148188 save restore time and position in local_metadata instead of tablet record, more params cleanup and refactoring from reviews
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-10-03 15:38:12 -07:00
deepthi d689461f97 add fields to Tablet record to store which backup we restored from, and which gtid we restored to
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-10-03 15:33:59 -07:00
deepthi 1732232e6f add base_keyspace param to CreateKeyspace
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-10-03 15:33:59 -07:00
deepthi 2e77b986af CreateKeyspace for snapshot keyspaces
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-10-03 15:33:56 -07:00
Nitin Shatma d93239c76e proto-changes
Signed-off-by: Nitin Shatma <nitin.sharma@airbnb.com>
2019-10-02 18:51:16 -07:00
Nitin Shatma b912811977 vstream optional field event
Signed-off-by: Nitin Shatma <nitin.sharma@airbnb.com>
2019-10-02 12:23:16 -07:00
chentanjun 1a43e41322 fix-up typo
Signed-off-by: chentanjun <2799194073@qq.com>
2019-08-26 11:28:06 +08:00
Sugu Sougoumarane 19f23cc041 migrater: add more fields to Journal
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane 3fb294471c migrater: initial cut
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane 4e80ef467b vstream: address review comments
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-06-06 15:40:29 -07:00
Sugu Sougoumarane 0b59741632 vstream: RPC scaffolding
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-05-13 20:30:35 -07:00
Sugu Sougoumarane b4379fa078 consistent lookup: address review comments
The VCursor API is impressively simpler no.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-05-09 20:59:29 -07:00
Sugu Sougoumarane 91ea12e8e5 consistent lookup: commit order in Session
Added two new shard sessions for commit ordering:
pre and post.

Added API to set the commit order and changed
tx conn to honor it.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-05-05 19:36:42 -07:00
Sugu Sougoumarane 08791180dc vschema: routing rules proto changes
This is the first part of the changes to implement #4790.
This part implements all the management functionality for
routing rules.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-04-22 20:00:00 -07:00
Sugu Sougoumarane 856a196bc6 vstreamer: rowstreamer locks the table
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-04-17 11:09:54 -07:00
Sugu Sougoumarane c096533521 vplayer: copyTables initial cut
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-04-17 11:04:32 -07:00
Sugu Sougoumarane 1d2d111be9 vstreamer: VStreamRows rpc method
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-04-17 11:04:32 -07:00
SataQiu 139b49e351 fix spelling mistake: conjonction -> conjunction
Signed-off-by: SataQiu <qiushida@beyondcent.com>
2019-04-17 11:59:27 +08:00
deepthi d409c44b1f add mysql80 flavor to vttest
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-04-08 18:16:22 -07:00
Rafael Chacon 2c63167f11 Refactor region to aliases
* Deprecate the concept of regions.
* Favor aliases instead

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2019-03-29 19:28:16 -07:00
Michael Demmer 56c2a938d0
Merge pull request #4739 from tinyspeck/autocommit-batch-execute
Single round trip commit on BatchExecute
2019-03-22 08:47:38 -07:00
Rafael Chacon 20b59bb3ca Single round trip commit on BatchExecute
* When auto-commit is on, passDML is on and ExecuteBatch is in a transaction,
there is no need to explicitly create a transaction. We can forward the DML
directly to the database.
* This optimization yielded significant more throughput in vttablets. We got
around 25-30% improvement. Most of our queries are single point
inserts/updates that already use auto commit  when coming from vtgates, so this
improvement is something that we've been wanting to do for a long time.

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2019-03-21 15:35:46 -07:00
Rafael Chacon 13aa747940 Merge branch 'upstream-master' into 4496-topo-serving-shards-refactor 2019-03-07 13:16:12 -08:00
Sugu Sougoumarane 8913fcf081
Merge pull request #4699 from planetscale/ds-allow-master-backup
allow backup on master
2019-03-06 16:20:40 -08:00
Sugu Sougoumarane 31178f975a
Merge pull request #4637 from planetscale/ss-vheart
vreplication: improved lag tracking
2019-03-03 13:28:01 -08:00
deepthi 72689e8872 allow backups on master tablet
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-03-02 16:21:08 -08:00
Sugu Sougoumarane a6f5da6c6c
Merge pull request #4550 from planetscale/ds-reparent-undo
rollback changes made during PlannedReparent if we encounter errors
2019-02-22 15:14:36 -08:00
Rafael Chacon 9272b1cd73 Add ServedType for backwards compatiblilty
* Also adds more validations and tests when rebuilding serving keyspace

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2019-02-18 18:26:00 -08:00
Sugu Sougoumarane 41767d84fb vreplication: improved lag tracking
The new lag tracking introduces the following changes:
* VStreamer sends its current time along with every event. This
  allows for VPlayer to correct for any clock skew that may
  exist between the two machines. This results in a more accurate
  calculation of lag.
* If there are no events to send for a period of time, VStreamer
  sends a heartbeat event. This allows us VPlayer to essentially
  know for sure that it's still caught up.
* If VPlayer receives no event for its wait period, then it updates
  the SecondsBehindMaster stat to indicate that it's actually falling
  behind.

The VStreamer timeout for heartbeat is set slightly lower than the
VPlayer idle timeout. This ensures that Vplayer won't timeout
exactly when it's about to receive the heartbeat event.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-02-17 19:35:30 -08:00
Rafael Chacon 196cf77dd0 Move serving state from global topo to srv keyspace
Initial stab at: https://github.com/vitessio/vitess/issues/4496

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2019-02-05 14:40:14 -08:00
Sugu Sougoumarane 207b084ca8
Merge pull request #4555 from planetscale/ss-vrepl
vreplication: vplayer
2019-01-30 19:21:24 -08:00
deepthi 16ca2c34d3 #4481 rollback changes made during reparent if we encounter errors
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-01-24 17:08:13 -08:00
Andres Taylor be97d690eb Add capability create consistent transactions
To make this possible, some things are added:
 - The capability to lock all tables on a tablet, to momenterily stop updates
 - Once the database is locked, we can create multiple consistent snapshot
   transactions that all share the same view of the data
 - Adds the capability to have replication move forward to a specific point
   in the transaction log

This commit also refactors tabletserver and tx_engine, moving logic of
state transitions into the tx engine.

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-01-18 16:26:25 +01:00
Sugu Sougoumarane 39e974899d vreplication: vplayer basic functionality done
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-01-15 22:39:54 -08:00
Sugu Sougoumarane 1f0f55e783 vreplication: vplayer WIP
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-01-15 22:39:54 -08:00
Sugu Sougoumarane 6ff51d39cf vreplication: tests are done
Also had to added transmission of field info, which may come
in handy for encoding the values on the player end.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-01-02 19:50:42 -08:00
Sugu Sougoumarane a0b948974f vreplication: got some basic tests working
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-01-02 19:50:42 -08:00
Sugu Sougoumarane 8cd1c5b33f vreplication: tabletserver inits and other tweaks
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-01-02 19:50:42 -08:00
Sugu Sougoumarane ec4e808b47 vreplication: vstreamer, plan and filtering
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-01-02 19:50:42 -08:00
Sugu Sougoumarane f5868c6f72 vreplication: vstreamer Engine
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-01-02 19:50:40 -08:00
Rafael Chacon e0133e43b8 Regenerates protobuf files using protoc 3.6.1
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2019-01-02 15:22:57 -08:00
Sugu Sougoumarane 066779f520 select *: more review comments
I also had to fixup vtexplain to make it load vschemas with enums
properly.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2018-11-19 15:11:46 -08:00
Sugu Sougoumarane af9817fad2 select *: is_authoritative flag
If this flag is set for a table, we'll treat the column list
as authoritative and expand select *.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2018-11-18 08:14:55 -08:00
Michael Demmer 5fc6e90e00 add get_warnings to the python client connection class
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
2018-10-28 10:33:11 -07:00
Michael Demmer 61a253c33a add a new query.QueryWarning array to the vtgate.Session proto
To enable conveying out of band warnings, add a new proto definition
for a QueryWarning and add a repeated array to the vtgate session.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
2018-10-27 16:01:10 -07:00
Sugu Sougoumarane b9b8cf113c resharding: safer MigrateServedTypes
MigrateServedTypes has been made idempotent: if it fails in
the middle, you can safely retry the operation. If the operation
has previously succeeded, retrying it will be a no-op (except
for master migration).

For master migration. A new Frozen field has been added to the
tablet control record. This field signifies the point of no
return. If a migrate fails before reaching this state, then
we undo everything and re-enable the source shards. Once we
go past the 'frozen' state, you can only go forward. If there
are failures after the frozen state, the migrate can be safely
retried until successful. Once successful, a retry will return
an error saying that there's no resharding in progress.

The resharding end to end test has been updated to demonstrate
these behaviors.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2018-10-06 18:41:19 -07:00
Michael Berlin ae5c4d7f7a py: Change CallerID to have a useful repr.
This is helpful when printing the object in logs.

Signed-off-by: Michael Berlin <mberlin@google.com>
2018-09-28 10:42:40 -07:00
Dan Kozlowski 0d54495736 Adding in support for MariaDB 10.3
Signed-off-by: Dan Kozlowski <koz@planetscale.com>
2018-09-10 09:50:04 -07:00
Rafael Chacon 8b99e7a89a Update workflow to include CreateTime
* This change allows us to sort workflows in a deterministic way.

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2018-08-24 17:32:25 -07:00