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

1766 Коммитов

Автор SHA1 Сообщение Дата
Michael Berlin fb7b28b137 test: Introduce new flag --num_insert_rows_before_reparent_test for TestReparentDuringWorkerCopy.
Only TestReparentDuringWorkerCopy requires a large amount of rows to keep vtworker SplitClone busy for a long time such that we can time it and run a planned reparent just after it started.

With this change, only TestReparentDuringWorkerCopy will use the new flag which should usually have a high value (default in open-source: 3k).

The existing flag --num_insert_rows covers all test and requires no mimum number of rows. Therefore, I've reduced its value from 3k to 100.
2016-01-29 18:50:44 -08:00
Alain Jobart 08c7fbd47a More fixes after my python test API refactor. 2016-01-29 10:03:15 -08:00
Alain Jobart 7c3d973f57 Fixing a use case of my previous refactor. 2016-01-29 09:58:59 -08:00
Alain Jobart f5702966cd Fixing lint warning in this test. 2016-01-28 17:38:18 -08:00
Alain Jobart b62b5eb921 Using python vtgate protocol in these tests, explicitely. 2016-01-28 17:30:39 -08:00
Alain Jobart 9b9a3d77d0 Simplifying tests, some easy refactor. 2016-01-28 17:16:41 -08:00
Alain Jobart 4f4b7e9fe3 Fixing a few more things, vtgatev2_test now passes. 2016-01-28 10:04:22 -08:00
Alain Jobart 5814326359 Fixing a couple things to vtgatev3 passes with gRPC. 2016-01-28 08:20:10 -08:00
Alain Jobart efdf2a9d18 Checkpoint of new grpc python client.
It passes python_client_test so far, not more.
Stuck on the batch API for now, not sure we need the dual-API.
2016-01-28 07:11:33 -08:00
Anthony Yeh d7c29540fc Rebalance tests. 2016-01-26 12:46:19 -08:00
Michael Berlin 88be3099fe worker: Rename flag "worker_retry_delay" to "worker_healthcheck_retry_delay".
This way we are consistent and all healthcheck related flags are properly grouped.

vttablet: Split up flag "binlog_player_retry_delay" into the existing flag and "binlog_player_healthcheck_retry_delay". Now the two flags are used for two different purposes. Similar to the worker code, all healthcheck flags are properly grouped now.
2016-01-19 15:43:43 -08:00
Michael Berlin 2e3b0d6066 Merge pull request #1442 from michael-berlin/vtworker_rename_blp_checkpoint_strategy
vtworker: Make populating blp_checkpoint table the default.
2016-01-14 13:50:35 -08:00
Michael Berlin 4fe1093adf vtworker: Make populating blp_checkpoint table the default.
Renamed strategy flag from "-populate_blp_checkpoint" to
"-skip_populate_blp_checkpoint".

Since it's on by default now, I've removed all occurrences where the old
flag was set explicitly.
2016-01-13 18:23:52 -08:00
Michael Berlin 035b808cfe test/vertical_split.py: Converted to use healthcheck only.
Before this, we forced rdonly tablets back to "rdonly" using ChangeSlaveType. However, they would go back to their target tablet type eventually: When taken out by vtworker, their type becomes "worker". When the work is done, their type goes back to "spare". If the healthcheck sees that the spare caught up with replication, it goes back to the target tablet type i.e. "rdonly".

By forcing the healthcheck, we shorten the test time and don't have to wait for the next healthcheck interval.
2016-01-13 17:44:27 -08:00
Michael Berlin 0e6a57094c test/vertical_split.py: Moved test for SetShardTabletControl into separate method.
This way, it's more clear that this test is indepedent of the vertical_split test itself.

Improved testing the expected list of db types in tablet_control.
2016-01-13 17:37:41 -08:00
Michael Berlin 8a03d167dc test/vertical_split.py: Remove _check_client_conn_redirection() after master migration because it's a no-op at that point. 2016-01-13 16:56:26 -08:00
Michael Berlin c2f2fe3c0f test/vertical_split.py: Move check that binlog player to the correct position.
MigrateServedFrom should stop filtered replication and therefore the binlog player.
2016-01-13 16:55:18 -08:00
Michael Berlin 1b259ee7d9 Merge pull request #1432 from michael-berlin/automation_vertical_split
automation: Cluster operation for vertical split.
2016-01-12 15:01:55 -08:00
Michael Berlin 49e07b6ed3 test/automation_vertical_split.py: Clarify why unittest import is unused. 2016-01-12 11:14:53 -08:00
Michael Berlin 43e6b50059 test: End-to-end test for vertical split via automation framework. 2016-01-12 06:19:38 +01:00
Michael Berlin db6c0ceba1 test/vertical_split.py: Fixed remaining pylint errors. 2016-01-11 23:38:48 +01:00
Michael Berlin c3678f5af3 test/vertical_split.py: Added a comment in _check_stats() to clarify the purpose of the check. 2016-01-11 23:33:14 +01:00
Michael Berlin 6aa47bc8b4 test/vertical_split.py: Move keyspace setup into setUp().
This way, vertical_split.py can be reused by a future automation_vertical_split.py.
2016-01-11 23:33:08 +01:00
Alain Jobart d03777dc6f Removing obsolete test. It's only valid for gorpc now,
but we're going away from it.
2016-01-06 09:47:46 -08:00
Michael Berlin 3edb182ca2 test: schema.py: Down to zero linter warnings.
Exempted the "too broad exception" warning from pylint because we actually want to catch all possible exceptions at these two places.
2016-01-06 15:52:15 +01:00
Michael Berlin 4b674a4fd4 Merge branch 'master' into copyschemashard_diff 2016-01-06 15:30:09 +01:00
Alain Jobart ecd54440d2 Use better endpoint management for workers finding rdonly instances. 2016-01-05 11:08:39 -08:00
Michael Berlin ee2205e9f3 vtctl CopySchemaShard: Compare source and destination schemas after the schema was successfully copied.
Although the copy was successful, we have to verify it to catch the case where the database already existed on the destination, but with different options e.g. a different character set.

In that case, MySQL would have skipped our CREATE DATABASE IF NOT EXISTS statement. We want to fail early in this case because vtworker SplitDiff fails in case of such an inconsistency as well.
2016-01-04 18:19:31 +01:00
Alain Jobart 943542948b Re-organizing the imports in the tests.
So we can switch to explicit registration, instead of having modules
register themselves, which is not very pythonic.
2015-12-28 08:23:00 -08:00
Michael Berlin 4ef9288400 test/local_example.sh: During mvn install, skip running the tests but not compiling them.
Hopefully, this fixes the travis error that the artifact "com.youtube.vitess:client:jar:tests:1.0-SNAPSHOT" cannot be found.
2015-12-21 05:26:03 -08:00
Michael Berlin 840b6fb1cc test: Fix running the Java example.
Specified dependeny for the Maven exec plugin (Travis tried to use an old location which no longer works).

Also added missing checking of the error code.
2015-12-18 19:59:03 -08:00
Michael Berlin c7f2b17d5c java: Add "example" project to demonstrate how to use the Java client. 2015-12-17 22:31:16 -08:00
Liang Guo c72a6f57aa Updated comment in vtgatev2_test. 2015-12-16 18:46:37 -08:00
Liang Guo a15fbf3207 Update vtgatev2 test to better support testing gateway implementations. 2015-12-16 15:05:17 -08:00
Alain Jobart e73c337be0 Better test message. 2015-12-14 10:29:27 -08:00
Alain Jobart a4f7936c23 Adding vtctl RPC interface to vtcombo, with unit test. 2015-12-14 08:02:41 -08:00
Alain Jobart 6af7c0d093 Removing one source of flakiness in this test. 2015-12-10 11:33:16 -08:00
Alain Jobart f46bd25d3e Adding vtctld functionnality to vtcombo. 2015-12-10 06:56:36 -08:00
Alain Jobart 2e1fa12590 Cleaning up more old stuff in vtctld. 2015-12-10 06:56:36 -08:00
Alain Jobart 5f5ffb8fcf Fixint vtctld test to query at least top level api for explorer. 2015-12-10 06:56:36 -08:00
Michael Berlin 50b9021a2c vtgatev3_test.py: Fix teardown exception when keyspace_env is None.
This happens when the test exits early because a previous test was not cleaned up correctly.
2015-12-09 21:12:15 -08:00
Anthony Yeh 2493fe240e Merge pull request #1379 from enisoc/example-client
Add more sample clients for examples/local.
2015-12-08 16:33:15 -08:00
Anthony Yeh de4d7f56cb Merge pull request #1375 from enisoc/lameduck
tabletmanager: Add grace period for lameduck.
2015-12-08 15:30:29 -08:00
Anthony Yeh bb19686bef Add more sample clients for examples/local.
These are alternative clients that show how to do the same thing as
examples/local/client.py in other languages.
2015-12-08 15:11:39 -08:00
Michael Berlin 581e1ee101 custom_sharding.py: Fix correct verification of number of shard_references per tablet type.
The order of the map ("master", "replica", "rdonly") can change, so we cannot compare indexes and must check each type explicitly.
2015-12-08 12:37:55 -08:00
Michael Berlin d6abde22ea vtclient: Add -keyspace and -shard flags to support per-shard fallback mode of the Go SQL driver.
Added end2end test for this in custom_sharding.py.
2015-12-08 12:35:01 -08:00
Anthony Yeh 0207f13ac7 tabletmanager: Add grace period for lameduck.
The tabletmanager grace period is the amount of time it pauses after
broadcasting to vtgate that it's going to stop serving a particular
target type (e.g. when going spare, or when being promoted to master).
During this period, we expect vtgate to gracefully redirect traffic
elsewhere, before the tablet actually starts rejecting queries for that
target type.

The -serving_state_grace_period flag defaults to 0, which corresponds
roughly to the old behavior, with an additional health broadcast.

However, after manually running the tests with value 0, I've set the
default value in test/tablet.py to 1s. There are no branches in the
code for the 0 value; it just means the Sleep() returns immediately.
So it isn't worth running the entire test suite twice from now on.
2015-12-07 19:15:12 -08:00
Michael Berlin 2018fe9ecf Fix initial_sharding.py after always sending a KeyRange in the SplitQuery result, even for unsharded keyspaces. 2015-12-05 17:06:15 -08:00
Liang c0366e645c Merge pull request #1366 from youtube/vtgate
Make vtgatev2 test less flaky.
2015-12-03 18:39:00 -08:00
Liang Guo 4863b2cf4b Update vtgatev2 test. 2015-12-03 15:29:53 -08:00
Alain Jobart 28d5c7152d Fixing a source of flakiness in this test. 2015-12-03 14:36:58 -08:00
Liang Guo 03bce0b7fe Make vtgatev2 test less flaky. 2015-12-03 11:31:58 -08:00
Alain Jobart 7830e2475e Adding tests for SplitQuery in the 3 missing scenarios.
(we had tests for custom 2-shards sharded keyspace, adding cases
for single unsharded keyspace, sharded 1-shard and sharded
2-shards).
2015-12-03 09:29:40 -08:00
Alain Jobart 0af59dbed1 Fixing ordering of code in this test. Wonder why it ever worked. 2015-12-03 08:37:04 -08:00
Alain Jobart a88b0f1a75 Merge pull request #1362 from alainjobart/resharding
Removing the 'want_fields' flag for tm.ExecuteFetchAs*.
2015-12-03 06:37:20 -08:00
Liang Guo 4c6df26d86 Update vtgatev2 test. 2015-12-02 15:27:41 -08:00
Alain Jobart d8c0e7797d Removing the 'want_fields' flag for tm.ExecuteFetchAs*.
Defaulting it to true. Not worth the hassle.
2015-12-02 10:56:46 -08:00
Liang 5914145e52 Merge pull request #1357 from youtube/vtgate
Update Discovery Gateway and make vtgatev2_test pass.
2015-12-02 10:05:07 -08:00
Liang Guo ea4a13ef4a Implement vtgate gateway flavors as separate option, and various updates. 2015-12-01 15:09:27 -08:00
Liang Guo 54a449bba0 Merge branch 'master' into vtgate 2015-11-30 21:29:33 -08:00
Liang Guo 5c88974e3e Update Discovery Gateway and make vtgatev2_test pass.
Fix many pylint errors.
2015-11-30 21:14:21 -08:00
Dean Yasuda b2fb7b6e64 Remove rest of py/vtdb/__init__.py.
Register 'gorpc' vtgate_client in test/utils.py rather than py/vtdb/__init__.py.
2015-11-30 14:41:03 -08:00
Dean Yasuda b4b780ec82 Remove py/vtctl/__init__.py.
py/vtctl/gorpc_vtctl_client.py now registers the 'gorpc' vtctl_client.

Import gorpc_vtctl_client.py to test/utils.py.
2015-11-30 11:30:29 -08:00
sougou 9e7778271a Merge pull request #1338 from youtube/suguwork
sqltypes: backward compatibilty tweaks
2015-11-18 15:33:55 -08:00
Sugu Sougoumarane d7a6e87f93 sqltypes: backward compatibilty tweaks
Some changes of sqltypes were not backward compatible:
- Sometimes we get nil bytes for valid string types.
- bsonrpc and grpc were different for Result.Rows.
2015-11-18 14:53:43 -08:00
Anthony Yeh 49febf6b93 Merge pull request #1336 from enisoc/healthcheck
healthcheck: Don't update tablet record if it's been taken over.
2015-11-18 13:03:58 -08:00
Sugu Sougoumarane 0774f139d1 Merge branch 'master' into suguwork 2015-11-17 19:11:24 -08:00
Anthony Yeh ea3d65791c healthcheck: Don't update tablet record if it's been taken over.
If the machine a tablet is on loses contact with the cluster, a human or
automated cluster manager may launch a replacement tablet on another
machine. If the original tablet later regains contact, we need to
prevent its healthcheck from modifying the tablet record, which is now
owned by a new instance.

To do this, we rely on the fact that each tablet will set its IP and
primary port in topology on startup. The IP:port should never change for
the life of a process, and any new process that runs simultaneously with
the old one should always have a different IP:port tuple.

Thus, we say that whichever tablet has its IP:port in the tablet record
is the true owner of that record. The healthcheck of any other tablet is
not allowed to modify the record. Note that this check for ownership
applies ONLY to the healthcheck (which includes going SPARE on
shutdown). All other updates to tablet records are unaffected.
2015-11-17 17:08:57 -08:00
Ammar Aijazi 59072cf5f0 Enable python client tests for all protocols 2015-11-17 14:44:46 -08:00
Anthony Yeh c6e3d015ca Delete java_vtgate_test_helper.py
All tests should now be using either vtgateclienttest or vttest.
2015-11-17 14:16:21 -08:00
Sugu Sougoumarane 565415ae08 Merge branch 'master' into suguwork 2015-11-17 13:21:43 -08:00
Sugu Sougoumarane a822e5d7f3 sqltypes: new Value
The new Value implementation is now based on the vitess types.
* The inner interface has now been replaced by typ and val.
* All Values are expected to be consistent with their types.
  For example, an Int64 type must contain a number.
* The functions that build values generally ensure consistency.
* There is a set of 'Trusted' functions that can bypass this
  consistency check. They should be used with care.
* The proto3 conversion functions build the correct Value types
  based on the field types.
* The bson conversion function provides a Repair function that
  allows you to fix up the types after the fact. This should be
  deleted after bson is deprecated.
* The building of Values from a QueryResult is non-trivial because
  the field info is not part of the QueryResult for streaming
  queries. So, the API requires fields to be explicitly passed in.
* Fuctions that encode or convert to native types expect Value
  to be consistent. If not, they panic.
* proto3.QueryResult is considered to be trusted. If it contains
  inconsistent data, it will cause panics.
* The EventStreamer has been fixed to ensure that the fields and
  rows it publishes are trustable: They can used as parameters
  to the Trusted API.
* The Raw() function usage has been minimized. We should see if
  it can be deprecated. This way, we can make Result truly read-only.

There are a few more tweaks that need to be done:
* The Proto3ToResult call plumbing was hacked in to make everything
  work. That part needs cleaning.
* The bind vars don't need to be converted to their native types
  any more.
2015-11-17 12:59:45 -08:00
Alain Jobart 4a16223e76 Merge pull request #1329 from alainjobart/resharding
More proto3 uses: logutil.LoggerEvent, vgate.Bound*Query
2015-11-16 16:07:22 -08:00
Michael Berlin da1b695814 test: Use explicit command for Python unit tests.
These tests no longer use our test runner and therefore fail when
test.go supplies --skip-build by default.

Specifying an explicit command in the test config overrides the default
assumption that the test would use our custom test runner.
2015-11-16 15:41:05 -08:00
Michael Berlin 0252a6921a test: Fix all pylint issues in keyrange_test.py. 2015-11-16 15:24:08 -08:00
Michael Berlin 8ac9938f3a Use standard Python unit test runner for pure unit tests to drop dependency on "units" module.
NOTE: This is an automated export. Changes were already LGTM'd internally.
2015-11-16 15:20:58 -08:00
Alain Jobart 6389f7bc2e Retiring logutil.LoggerEvent in favor of logutilpb.Event. 2015-11-16 08:08:18 -08:00
Michael Berlin 9f4b274da2 test: Fix pylint issues in backup.py, reparent.py and
rowcache_invalidator.py.
2015-11-15 18:21:02 -08:00
Michael Berlin 8edf07d511 test: Remove invocations of vtgate where it's (no longer?) necessary. 2015-11-15 18:08:57 -08:00
Michael Berlin d5788cc408 test: Fix alignment of parameters. 2015-11-15 18:07:57 -08:00
Michael Berlin 3a7af2ec12 Merge pull request #1325 from michael-berlin/fix_pylint_issues
test: Fix all pylint issues in utils.py, tabletmanager.py and update_stream.py.
2015-11-15 16:53:46 -08:00
Michael Berlin ddae7e0d4e Merge branch 'master' into worker_py_use_rpc_client_2 2015-11-15 16:36:43 -08:00
Michael Berlin e5bc6b05c3 test: worker.py: Readded and updated comment around the possible race for the PlannedReparentShard case. 2015-11-15 15:57:39 -08:00
Michael Berlin 32320a403a test: Restore executable bit file mode for modified tests.
It was cleared by the Eclipse Git index editor :-(
2015-11-15 14:46:11 -08:00
Michael Berlin bd711bf077 test: Introduce new protocols flavor property "client_error_exception_type".
This allows the tests to check for more specific exceptions and in turn fixes the pylint error that the "except" is too broad.
2015-11-15 14:31:52 -08:00
Michael Berlin 00cd50edab test: Fix all pylint issues in utils.py, tabletmanager.py and update_stream.py. 2015-11-15 14:26:13 -08:00
Michael Berlin d4bdaa1263 test: Unify wait_for_tablet_type_change() helper methods.
There were two almost identical methods in utils.py and in tabletmanager.py.

For the tablet type I'm using strings instead of the proto constants now because it's easier to read and shorter. The proto function which converts the string into an enum value will still check if the type is valid.
2015-11-15 14:26:13 -08:00
Anthony Yeh f59f6ccd2a vtcombo: Fix race condition in StreamExecute.
While porting tests from java_vtgate_test_helper to vtcombo, I found
that streaming queries that fetched more than ~300 rows would indicate
success, but receive fewer rows than expected. The number of rows actually
returned was always in the same ballpark, but would fluctuate from run
to run.

It turned out that since vtcombo returns results in-memory from vttablet
to vtgate, we were returning a *Result once the rows filled up the
buffer size, and then concurrently modifying the already-returned struct
to fill in the next set of rows.
2015-11-15 01:04:51 -08:00
Michael Berlin 241bbe8f2d test: worker.py: Replace one-shot vtworker invocation of SplitClone with RPC call via vtworkerclient binary.
Since vtworker no longer exits after the command finished, we can now reliably test for variables.
2015-11-14 19:36:55 -08:00
Michael Berlin 0b79eed789 test: worker.py: Fix pylint errors. 2015-11-14 17:01:02 -08:00
Michael Berlin 7765dac0e2 test: worker.py: Re-raise exceptions in try/except blocks during setUp.
These blocks tearDown the environment when setUp fails. When the exception does not get re-raised, it becomes effectively swallowed and the test runs despite the failed setUp.
2015-11-14 16:48:04 -08:00
Michael Berlin 9d80a36249 test: worker.py: Log list of tablets on debug.
This makes it easier to debug issues and e.g. find out which tablet is supposed to the master.
2015-11-14 16:46:17 -08:00
Michael Berlin ef873d3485 test: worker.py: Remove debug output of the list of tablets. 2015-11-14 16:34:16 -08:00
Michael Berlin f2886c3d66 stats: Remove the stats variable type "States".
Track the state of each Zookeeper connection in the "ZkCachedConn" variable instead.

Remove "ZkMetaConn" variable because "ZkCachedConn" has the same information now.

Update tabletmanager.py end-to-end test.

I'm removing states.go because it caused a deadlock in the worker.py test.

Its removal is no loss because the original intent was to detect flip-flopping with that code. However, that's no longer necessary.

The observed deadlock occurred when a) somebody polls /debug/vars while b) we create a new Zookeeper connection and publish a "ZkCachedConn" variable for it.

When the connection gets created, then the "states" object is created. The same call also calls expvar.Publish() eventually and this is where the deadlock occurs. (It's a deadlock between a mutex in the "expvar" package and a mutex in the Zookeeper connection package.)
2015-11-13 16:36:47 -08:00
Alain Jobart dc4dfb1eac Merge pull request #1311 from alainjobart/resharding
Changing tabletmanager API to use the proto3 QueryResult directly.
2015-11-13 08:35:36 -08:00
Anthony Yeh 993663574f vtctld: Clean out old UI. 2015-11-12 22:52:07 -08:00
Alain Jobart a79f9bb933 Fixing this test to work after my previous change (the field names changed
from Rows to rows, Fields to fields). Also fixign a few pylint errors.
2015-11-12 11:40:54 -08:00
Alain Jobart f18a427da0 Changing tabletmanager API to use the proto3 QueryResult directly.
This feels simpler everywhere, except for one place where we're lacking
the right helper methods, but i know this is coming in Sugu's next changes.
2015-11-12 10:18:15 -08:00
dumbunny cc59ff9832 Merge pull request #1307 from dumbunny/v2v3
Merge vtgatev3 into vtgatev2.
2015-11-11 15:45:37 -08:00
Dean Yasuda b7566a4109 Merge branch 'master' into v2v3 2015-11-11 15:15:23 -08:00
Dean Yasuda 3e10eec9e2 Merge vtgatev3 into vtgatev2.
* vtgatev2 will later be named vtgate_gorpc_client.
  * Pass more info to converted exceptions.
  * Clean up lint errors.
2015-11-11 15:13:23 -08:00
Alain Jobart ac5763e042 Removing deprecated service_map entry. 2015-11-11 10:24:40 -08:00
Anthony Yeh e4ee03146c test/schema: Fix shard_2 setup/teardown.
The test requires that some steps occur before shard_2 comes up,
so shard_2 has a separate setup function. However, the test was trying
to combine teardown of shard_2 with the rest, which was confusing and
resulted in attempting to init mysql twice without tearing it down.

This splits out teardown of shard_2 so it behaves correctly and is
easier to understand.
2015-11-10 11:41:30 -08:00
Anthony Yeh b89d988e30 Make MySQL users and privileges configurable.
This gets rid of the opaque mysql-db-dir.tbz archive, replacing it with
a .sql file. The .sql file approach makes it clear what state the DB is
initialized with, and also makes it easy to customize.
2015-11-10 11:41:24 -08:00
Alain Jobart 6751c65693 Using enumerate() in a few places where it's appropriate.
Thanks @aaijazi for the suggestion.
2015-11-09 14:23:14 -08:00
Alain Jobart bc991f703d RIP gorpc tabletmanager. We have a fully functional gRPC version. 2015-11-09 13:47:41 -08:00
Alain Jobart 35ee67fd9e Adding a test to make sure an interrupted vtctl command works. 2015-11-09 13:14:59 -08:00
Alain Jobart b940f5278f Removing native StreamEvent, replacing it with proto3 version. 2015-11-09 09:23:29 -08:00
Dean Yasuda b3423f99a0 Fix test/resharding.py typo. 2015-11-05 20:31:38 -08:00
Dean Yasuda f8632302bd Merge branch 'master' into pylint 2015-11-05 16:57:23 -08:00
Dean Yasuda b6a7a01efe Use pylint test-mode for fiels in test/.
Clean some obvious pylint errors in test dir.
2015-11-05 16:55:30 -08:00
Alain Jobart 6ff9ebd280 Fixing test and comment. 2015-11-05 12:24:30 -08:00
Alain Jobart f41a173e2d Fixing a couple details:
- grpc_vtctl_client still had deprecated lock_timeout.
- adding a test for vtctld dying on startup.
- fixing a few lint errors.
2015-11-05 09:18:53 -08:00
Alain Jobart cb00443e17 Merge pull request #1276 from alainjobart/resharding
Now vttablet will run a RebuildKeyspace in its cell if the SrvKeyspace object doesn't exist
2015-11-03 16:58:41 -08:00
Anthony Yeh 06a59af397 test/resharding.py: Keep track of master changing.
The test does a planned reparent, but then later steps assume the old
tablet is still the master. After the reparent, we should update the
test's expectation of who the master is.
2015-11-03 14:50:03 -08:00
Alain Jobart beb8d4cfbf Now vttablet will run a RebuildKeyspace in its cell if the
SrvKeyspace object doesn't exist. Fixing an issue with zktopo
that was not returning correct error for missing SrvKeyspace.
Also fixing some (but not all) pylint errors in the files
I touched.
2015-11-03 11:20:12 -08:00
Alain Jobart 11c40b5442 Fixing binlog end to end test. 2015-11-02 14:58:14 -08:00
Alain Jobart 51bc93a851 Fixing two more end to end tests.
Also fixing the logs in a test.
2015-11-02 13:43:39 -08:00
Alain Jobart 024a12186b Fixing resharding.py:
- vttablet now uses query service to talk to other tablet for health check.
- making all retries and timeouts configurable (using short values in tests).
- doing a single manual health check on source tablets so their health is good.
2015-11-02 13:28:47 -08:00
Anthony Yeh 8100fbc2d1 Merge pull request #1263 from enisoc/local
Update local example scripts and docs
2015-10-29 22:59:36 -07:00
Anthony Yeh 785c99688a Add CI test for local example scripts. 2015-10-29 18:24:31 -07:00
Ammar Aijazi b92e75b4ce Make worker.py test wait longer between resolving the master tablet 2015-10-29 17:14:09 -07:00
Anthony Yeh a05f48ba42 test.go: Add tags for grouping tests.
The Makefile previously listed tests explicitly for groups like
site_test and worker_test. These lists got out of date when tests were
removed from test/config.json, and the make rules broke. Now the groups
are defined in config.json itself, so there is one place to update
everything.
2015-10-29 13:27:23 -07:00
dumbunny 5895f58345 Merge pull request #1259 from dumbunny/entity_ids
Clean up vtgatev2.py after merging entity_ids in.
2015-10-28 17:34:05 -07:00
Dean Yasuda 8b5fa5e77b Fix vtgatev2._execute logic.
vtgatev2._execute should use entity_keyspace_id_map if provided,
overriding keyspace_ids / keyranges.

Fix pylint errors.
2015-10-28 15:00:24 -07:00
Dean Yasuda a9f427d6fa Add sql_builder.NotLike where expr. 2015-10-28 11:59:37 -07:00
Anthony Yeh 0e602ee49a Merge branch 'master' into proto 2015-10-27 21:40:29 -07:00
Alain Jobart e397a2b266 Removing zkns / pdns code. Mostly unused. 2015-10-26 16:09:19 -07:00
Alain Jobart e2812a5e93 Removing ChangeSlaveType's -force option. Extra code for not much,
can use 'vtctl InitTablet -update' to achieve the same result.
2015-10-26 09:48:45 -07:00
Sugu Sougoumarane 52f291de7d proto: fix custom_sharding test 2015-10-25 16:49:01 -07:00
Dean Yasuda c079f66739 Merge branch 'master' into entity_ids 2015-10-23 17:24:04 -07:00
Michael Berlin cf87989c51 Change client protocols from BSON RPC to gRPC.
This commit changes the following protocols:

- binlog_player_protocol
- vtctl_client_protocol

The only BSON protocol left is vtgate pending the implementation of the
gRPC vtgate client.

Note that we originally added this change in
https://github.com/youtube/vitess/pull/1230

However, we reverted it because the Kubernetes tutorial and images were
out of sync. Therefore, this commit technically is the revert of the
revert.

Revert "Revert "Change protocol defaults to grpc.""

This reverts commit 5e5f40a04e.
2015-10-23 13:46:52 -07:00
Alain Jobart 477c948cc2 Using topo proto3 in tests to get tablet types. 2015-10-23 07:12:49 -07:00
Alain Jobart cff02b5c10 Removing SCHEMA_UPDATE tablet type, unusued. Re-ordering existing
types in proto3.
2015-10-23 07:12:49 -07:00
Alain Jobart 9ab82adb35 Fixing overzealous fixes. 2015-10-23 07:12:49 -07:00
Alain Jobart 4954056bdd Fixing a bunch of linter errors. 2015-10-23 07:12:49 -07:00
Alain Jobart e7f8647f00 Fixing initial_sharding.py to delete old master with flag. 2015-10-23 07:12:49 -07:00
Alain Jobart 3de786ba87 Fixing iexternal reparent test to delete the old unhealthy master. 2015-10-23 07:12:49 -07:00
Alain Jobart 73497d2a16 Checkpoint of removing IDLE and SCRAP states. All unit tests pass,
most integration tests pass too.
2015-10-23 07:12:49 -07:00
Ammar Aijazi 27c7182b3f Make some fixes for test/worker.py now that we create the db on shard init 2015-10-22 15:52:48 -07:00
Dean Yasuda 2fbbec7995 Merge execute_entity_ids into execute.
This merges the functions in py/vtdb/{vtgate_cursor,vtgatev2}.py.
2015-10-22 06:34:33 -07:00
Anthony Yeh 6286868264 Fix schema.py test for new InitShardMaster behavior.
It creates the db now.
2015-10-21 16:47:01 -07:00
Anthony Yeh 19cfae8351 backup: Date should be first in backup name.
We assume the latest backup is the one that's at the end when the list
of directories is sorted. This assumption is violated if we put the
tablet alias first in the name.
2015-10-20 21:03:30 -07:00
Anthony Yeh 4e74752def Rebalance tests. 2015-10-20 12:15:02 -07:00
Alain Jobart 07fb5b4a8e Fix flakiness in this test: ReloadSchema might be asynchronous. 2015-10-20 11:29:00 -07:00
Alain Jobart a9ec13cd6e Moving vtctld_test to shortest running shard. 2015-10-20 09:47:31 -07:00
Alain Jobart a605eb92d2 Fixing vtctld test, adding it to travis run. 2015-10-20 09:33:54 -07:00
Alain Jobart 50a1db7040 Deflaking this test: if table creation takes time to
propagate through replication, we were raising an exception.
2015-10-20 08:36:16 -07:00
Alain Jobart 46701b2590 Fixing flakiness in this test: triggering a ReloadSchema
much earlier, so schema is there when we try to access
tables.
2015-10-20 08:23:39 -07:00
Alain Jobart a68b69e32b Fixing reparent.py to work with required sharding key column name. 2015-10-20 08:03:43 -07:00