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

10982 Коммитов

Автор SHA1 Сообщение Дата
Rasta 90fd05ab4e Fix for OSX Sierra build of Protobuf bundled with Grpc 2016-10-08 00:23:44 +02:00
Alain Jobart 4a59feae44 Rebuilding keyspaces in parallel. 2016-10-07 14:00:56 -07:00
Chris Gillis dca912b953 more specific link to appropriate docker reference material (#2104) 2016-10-07 22:59:09 +02:00
Robert Navarro 28926f5f46 Add the --no-cache flag to the vitess lite docker build (copied from the bootstrap build.sh) (#2116) 2016-10-07 22:39:48 +02:00
Alain Jobart 459080ada1 Merge pull request #2124 from alainjobart/mysql56
Fixing test/cache_invalidation.py for MySQL 5.6
2016-10-07 12:55:35 -07:00
Alain Jobart c3c3852a30 Merge pull request #2125 from alainjobart/workflow
Fixing timeouts in workflow tests.
2016-10-07 11:57:51 -07:00
Alain Jobart 863b5bd020 Fixing test/cache_invalidation.py for MySQL 5.6
In the process:
- fixing binlog replay starting from a timestamp: we just cannot skip
  the events at a lower level, as the binlogs may contain format event,
  binlog GTID set events, and so on. We need to parse them all.
- adding support for MySQL 5.6 PREVIOUS_GTIDS_EVENT event. It contains a
  SIDBlock, adding parsing for that (we already had code to generate it,
  as it's used to start replication from a GTIDSet).
- Some code in vtmysql_internals.h was incorrectly compiling for MySQL
  5.6 and higher, when it should have been 5.5.
2016-10-07 11:57:07 -07:00
Alain Jobart a86fd29c41 Fixing timeouts in workflow tests.
Although I don't see how that triggers the 'go test -race' timing out
fater 10 minutes.
2016-10-07 08:41:24 -07:00
Jonathan Amsterdam 3717dd56af gcsbackupstorage: change bucket.List to bucket.Objects (#2095)
The List method is deprecated and is going away soon.
2016-10-06 20:32:31 -07:00
Michael Berlin 93f3b2782b Merge pull request #2120 from michael-berlin/vtctl_refresh_state_by_shard
vtctl: Add command "RefreshStateByShard".
2016-10-06 20:29:07 -07:00
Ashu 2b0e1196a2 Adding Support for Column Aliasing in Select Queries. Issue 2110 (#2121)
* Adding Support for Column Aliasing in Select Queries. Issue 2110

* Incorporating Review Comments

*  Removed and extra line from route.go
2016-10-06 15:45:13 -07:00
sougou a152b853fc 2pc: tabletserver Prepare endtoend test (#2119)
* More changes to TabletServer transitions: Found more corner
cases where the new transactional requests can race against
state transitions. To simplify this, we allow such commands
only if the tabletserver is the master. Also, we wait for
all inflight transactional requests to complete before
rolling back transactions. This will prevent a new
transactional command from landing after a tx pool
had been fully rolled back.
* Some more clean-up on TabletServer: SplitQueryV2 also
uses execRequest now.
* Typos: aciton->action
2016-10-06 15:10:32 -07:00
Ashu 041fca210b Supporting ShardKey = xyz in parenthesis : vitess issue 2109 (#2122) 2016-10-06 11:25:43 -07:00
Alain Jobart 67b5bd42fe Merge pull request #2117 from alainjobart/vtgate
Vtgate VSchema UI and vars.
2016-10-06 07:01:43 -07:00
Michael Berlin d567ebb547 vtctl: Add command "RefreshStateByShard".
This command allows to run "RefreshState" on all tablets for a given shard.

This is useful in the following cases:

* when tablets must be refreshed after a blacklist rule was removed
* manually refreshing tablets e.g. when filtered replication was enabled or disabled

B=31752251
2016-10-05 21:26:38 -07:00
sougou f78c8301c7 2pc: TabletServer workflows (#2118)
All previously mentioned tabletserver workflow issues
are addressed now.
* A master->non-master transition immediately rolls back all
transactions including the prepared ones. This addresses the case
where MySQL was externally reparented.
* A master->shutdown transition waits till all transactions are
resolved. This addresses the reparent caused by the resharding
workflow. We don't want to shut down with unresolved transactions.
This code path is also used for normal reparents, where this behavior
is also acceptable.
* There is no race condition between state transition code and other
transactional commands. When we transition between two serving types,
we don't allow any requests until the transactions are rolled back.
During shutdown, we allow transactional statements, but the transition
code only waits for transactions to be resolved. So, there's no race
in either situation.
2016-10-05 20:15:38 -07:00
Alain Jobart 31f50af32e Adding vars counters for VSchema reloads. 2016-10-05 17:11:58 -07:00
Alain Jobart ba9270ca8e Merge pull request #2114 from alainjobart/vtctld
Adding acls to websocket, using right context.
2016-10-05 16:13:18 -07:00
Robert Navarro 3ade15b5bf Include Percona 5.7 Docker image in docs and test runner. (#2113) 2016-10-05 15:01:52 -07:00
Alain Jobart 1de7bfef7e Adding vschema summary in vtgate's statusz page. 2016-10-05 14:22:51 -07:00
Michael Berlin 09d504c2ab Merge pull request #2111 from michael-berlin/split_clone_verify_flags
worker: SplitClone: Verify that the user provided flags do not have i…
2016-10-05 11:35:31 -07:00
Alain Jobart 04705ea76b Adding acls to websocket, using right context. 2016-10-05 07:17:09 -07:00
Alain Jobart ae3e1df224 Merge pull request #2107 from alainjobart/workflow
Fixing a couple workflow minor things.
2016-10-05 07:02:04 -07:00
Alain Jobart 20c57f85a5 Fixing a couple workflow minor things. 2016-10-04 17:55:19 -07:00
Alain Jobart 71912ef60c Merge pull request #2100 from alainjobart/workflowmanager
Adding workflow library.
2016-10-04 17:50:37 -07:00
Michael Berlin 71a7fe01c0 Merge pull request #2105 from michael-berlin/grpc_increase_max_message_size
Allow to override the default gRPC max message size.
2016-10-04 16:35:03 -07:00
Michael Berlin 056180f26d worker: SplitClone: Verify that the user provided flags do not have illegal values. 2016-10-04 16:13:48 -07:00
Michael Berlin c939aebdda Merge pull request #2106 from michael-berlin/unify_printing_tabletserver_state
tabletserver: Fix problem that the wrong type was used in an error st…
2016-10-04 15:42:29 -07:00
Michael Berlin 637358bf26 Allow to override the default gRPC max message size.
Added new flag "--grpc_max_message_size" which defaults to 4 MiB (the gRPC 1.0.0 default).

Such large messages can occur when users try to insert very big rows. If they hit the limit, they'll see the following error:

grpc: received message length XXXXXXX exceeding the max size 4194304
2016-10-04 15:32:41 -07:00
Michael Berlin 0993d72934 tabletserver: Fix problem that the wrong type was used in an error string when printing the current state.
Unified other places where we print or log the state as well.
2016-10-04 15:04:50 -07:00
Alain Jobart 2ee2738bda Adding workflow library.
To manage long running workflows within Vitess.
It contains a sample Sleep workflow.
Wiring up the UI using WebSockets.
Also adding vtctl commands.
2016-10-04 14:09:31 -07:00
Alain Jobart 6e273c01f2 Merge pull request #2101 from alainjobart/proto3
Removing vtgate_python_types in tests.
2016-10-04 08:24:39 -07:00
Michael Berlin b36795a912 Merge pull request #2096 from michael-berlin/vtctl_master_migration_error
vtctl: MigrateServedTypes: Improve error messages and test coverage.
2016-10-03 18:42:27 -07:00
Michael Berlin e08f78aff3 vtctl: Update help text for "SetShardServedTypes" command.
- Mentioned parameters "cells" and "remove".
- Clarified that it's an emergency function.
- Changed example from multiple to a single served type.
2016-10-03 18:14:08 -07:00
Michael Berlin f6ed05014a topo: Add a test for full coverage of the ShardInfo.CheckServedTypesMigration method. 2016-10-03 18:14:08 -07:00
Michael Berlin df0f7359a5 vtctl: Improved error handling for MigrateServedTypes.
- If there are other types which must be migrated before MASTER, include them in the error message.
- Before doing this check, always check first if the to be migrated type is actually listed in the "Shard" object.
2016-10-03 18:14:08 -07:00
Michael Berlin b64d412cc6 Merge pull request #2103 from michael-berlin/go17
Bump minimum Go version from 1.5 to 1.7.
2016-10-03 14:27:52 -07:00
Michael Berlin 9eb1828be2 Bump minimum Go version from 1.5 to 1.7.
bootstrap.sh is currently failing in our Travis CI tests because "golint" dropped support for Go 1.5.

While we're at it, let's upgrade to 1.7 instead of 1.6. (After all, 1.7 also comes with a significant speed improvement.)
2016-10-03 13:57:34 -07:00
Michael Berlin a79a862350 Merge pull request #2102 from michael-berlin/test_migrate_served_types_map_randomization_fix
wrangler: Fix flaky unit test caused by Go map randomization.
2016-10-03 13:52:49 -07:00
sougou ec3c8bb198 2pc: WIP (#2099)
* More tests for Prepare, full coverage.
* Changed commit to use background context so it never times out.
* Changed Rollback to not return early under some conditions.
* Prepare from redo logs implemented, but more tests needed.
* TabletServer implementation of Prepare.
* Fix error handling in TabletServer.
* TwoPC doesn't depend on TxPool any more.
* Transactions with no statements are rolled back as no-op.
* Addressed code review comments.

The TabletServer state transition has some complications:
* SetServingType is currently just a flag flip. But it can
leave unresolved prepared transactions. This needs to be handled
correctly.
* For normal transitions out of master (or shutdown), prepared
transactions have to be rolled back because they will be
resurrected elsewhere. The current implementation waits
for prepared transactions to be resolved.
* For resharding, we'll need a special shutdown that waits
for prepared transactions to be resolved.
* If we allow CommitPrepared during shut down, it can cause
a race condition with the code that rolls back prepared transactions.
We need to add synchronization to prevent this.
2016-10-03 13:50:18 -07:00
Michael Berlin 336b1d6fa5 wrangler: Fix flaky unit test caused by Go map randomization.
This was introduced in https://github.com/youtube/vitess/pull/2098.
2016-10-03 13:19:20 -07:00
Michael Berlin aa771c4668 Merge pull request #2098 from michael-berlin/migrate_served_types_fail_if_no_sourceshard_entry
vtctl: MigrateServedTypes: Error if no "SourceShards" entry is present.
2016-10-03 11:55:26 -07:00
Michael Berlin b5862ecffd Merge pull request #2097 from michael-berlin/vtgate_status_page_show_type_per_partition
vtgate: Fix that the tablet type is shown in the "Partitions:" list o…
2016-10-03 11:36:12 -07:00
Alain Jobart 070925f83e Removing vtgate_python_types in tests.
We only use proto3 now.
2016-10-03 10:12:24 -07:00
Michael Berlin 109f26e443 vtctl: MigrateServedTypes: Error if no "SourceShards" entry is present.
This situation can occur when you e.g. run the online SplitClone only and then try to migrate types.

Note that vtctl MigrateServedFrom already has a similar check where it checks that there are three "ServedFroms" entries (one for each serving type).
2016-10-02 21:17:37 -07:00
Michael Berlin be7cdde8fe vtgate: Fix that the tablet type is shown in the "Partitions:" list on the status page.
Before, string(i) was shown where i is the index of the array element (e.g. 0, 1 or 2). string(i) for these low i values always returned an empty string because it would be interpreted as an ASCII code and these low values do not map to printable characters.

Other changes:
- use upper case tablet type string in the ServedFrom output. This is consistent with the "Gateway Status" and "Health Check Cache" output.
- Fixed output of the ShardingColumnType enum.
2016-10-02 20:52:21 -07:00
Alain Jobart fc419acc55 Merge pull request #2094 from alainjobart/vtgateclienttest
Vtgateclienttest
2016-10-01 09:44:12 -07:00
Alain Jobart 9db48035aa Splitting the python client testsuite.
Into a library and the binary. In some environments, creating the
connection cannot be done easily.

Also adding some test cases for exceptions.
2016-10-01 09:11:36 -07:00
Anthony Yeh 6e21ffe1cf Publish Launching Vitess guide. (#2091)
* Add Launching Vitess to vitess.io

* Fix markdown links.

* Fix Guides link

* split LaunchingVitess.md into subsections.

* rename Preparing for Production to Production Planning

* Turn TODOs into HTML comments

* Elaborate on cluster orchestration

* Use consistent capitalization of subheadings.

* Elaborate on application query patterns

* Elaborate on failover troubleshooting.

* Elaborate on additional MySQL parameters.

* Describe init_db.sql

* Document Orchestrator integration
2016-09-30 03:01:29 +02:00
Michael Berlin 5919cdd56c Merge pull request #2085 from michael-berlin/vtworker_add_retry_for_error_2013
worker: Retry writes if the MySQL error code is 2013 ("Lost connection").
2016-09-28 19:22:50 -07:00