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

1766 Коммитов

Автор SHA1 Сообщение Дата
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
Alain Jobart 877991915f Moving KeyRange query rule setting to tablet startup.
It is not expected to change after initial setup.
2015-10-19 08:23:36 -07:00
Alain Jobart 9284be4938 Merge pull request #1217 from alainjobart/resharding
Using protocol_flavors in vtgatev2_test.
2015-10-16 08:51:18 -07:00
Ammar Aijazi 21e934a6a2 Revert "Merge pull request #1215 from youtube/revert-1209-aaijazi_cleanup_error_flag"
This reverts commit 3ae5b3b510, reversing
changes made to 6860161fcf.
2015-10-15 17:37:56 -07:00
Alain Jobart 621e6e2276 Using protocol_flavors in vtgatev2_test. 2015-10-15 14:17:43 -07:00
Ammar Aijazi 5ce1f5492e Revert "Remove --rpc-only-in-reply flag from VTGate" 2015-10-14 16:05:49 -07:00
Alain Jobart 99a1901d6e Merge pull request #1208 from alainjobart/resharding
Removing a couple unused imports.
2015-10-14 14:01:02 -07:00
sougou 896bc75519 Merge pull request #1211 from youtube/suguwork
v3 demo: is now self-contained
2015-10-14 12:30:19 -07:00
Sugu Sougoumarane 573f9f62b2 v3 demo: is now self-contained
It's been changed to use vttest, and there is a script
that brings up everything, and tears down at the end.
The one problem with the new scheme is that the querylog
doesn't tell you which tablet the query came frome. Something
to think about in the future.
2015-10-13 21:30:27 -07:00
Ammar Aijazi 79659856ef Java GoRPC SplitQuery correctly reads error response 2015-10-13 19:38:33 -07:00
Ammar Aijazi 3e1361c8b2 Remove --rpc-only-in-reply flag from VTGate 2015-10-13 17:05:33 -07:00
Alain Jobart 4b7c28583b Removing a couple unused imports. 2015-10-13 13:19:30 -07:00
Alain Jobart 37ab2fae49 Merge pull request #1207 from alainjobart/resharding
Removing python object library, and python direct tablet access.
2015-10-13 12:36:07 -07:00
Alain Jobart db64050a99 Fixing resharding.py to not try to query a tablet directly,
but instead use vtctl's VtTabletExecute.
2015-10-13 08:43:13 -07:00
Alain Jobart 5991aac9b7 Removed toporeader from service map in tests. 2015-10-13 08:14:08 -07:00
Alain Jobart d379eab458 Removing two unused modules, and fixing setup.py. 2015-10-13 07:52:34 -07:00
Alain Jobart 87693af4c7 Removing direct tablet access from python.
One hack left in vtrouting.py, and then topology.py can go too.
Dean, I'll let you handle that one.
2015-10-13 07:41:58 -07:00
Alain Jobart 9aaa24c5a0 Removing the object python library, as we decided it's too much
for us to maintain.
2015-10-13 07:06:33 -07:00
Sugu Sougoumarane 36276567fa Merge branch 'master' into suguwork 2015-10-12 13:23:15 -07:00
Alain Jobart 8fd2543994 Merge pull request #1201 from alainjobart/resharding
Switching tabletmanager to the new tabletserver API.
2015-10-12 13:17:59 -07:00
Sugu Sougoumarane 720ef1f1a8 tests: remove obsolete framework.py
rowcache_invalidator was the last one using it for MultiDict.
Moved that class into the test itself.
2015-10-12 13:11:07 -07:00
Alain Jobart f2abbff2a0 Fixing this test: when we go from replica to spare,
we do not turn off invalidator any more. So removing that test case.
2015-10-12 12:53:03 -07:00
Alain Jobart 5d0b747661 Adding the 'serving' flag to StreamHealthCheck. 2015-10-12 12:05:43 -07:00
Sugu Sougoumarane 7403a556b8 RIP queryservice_test 2015-10-11 14:26:30 -07:00
Jeff (Zhefu) Jiang dd91fe0473 fix callerid sequence 2015-10-10 19:30:23 -07:00
Jeff (Zhefu) Jiang ac6715a8b1 fix opensource test cases 2015-10-10 19:24:38 -07:00
Sugu Sougoumarane 85e2dd7e18 Merge branch 'master' into suguwork 2015-10-10 17:16:14 -07:00
Sugu Sougoumarane 11273730ff tabletserver endtoend: cache_cases2 2015-10-10 16:47:44 -07:00
Sugu Sougoumarane 519819fc62 tabletserver endtoend: cache_cases1 2015-10-10 16:21:43 -07:00
Sugu Sougoumarane 3553772c61 tabletserver endtoend: nocache cases
I've written a code generator that converts the python cases
into go. Some massage is needed after the conversion.
The downside is that it's a brainless port. No re-interpretation,
regrouping or gap analysis.
2015-10-10 14:02:20 -07:00
Alain Jobart 965140c42f R.I.P. vtocc. 2015-10-09 16:01:33 -07:00
Alain Jobart c144bba292 Adding a unit test of the vttest setup in vttest_sample_test.py.
This requires using the protocol from flavors.
Also using ValueError exception instead of plain Exception
in vtgate_client.py.
2015-10-09 13:47:41 -07:00
sougou 2f5d097d7a Merge pull request #1192 from youtube/suguwork
tabletserver endtoend: most cache tests done
2015-10-09 10:39:59 -07:00
Sugu Sougoumarane c3b2901e2c tabletserver endtoend: most cache tests done. 2015-10-09 00:02:02 -07:00
Sugu Sougoumarane 88da603501 tabletserver endtoend: a few cache tests 2015-10-08 18:59:02 -07:00
Alain Jobart ffa5c9bd26 Removing vtocc+vtgate support in vttest, now only does vtcombo. 2015-10-08 07:31:09 -07:00
Anthony Yeh bc84f82666 test/config.json: rebalance test shards 2015-10-06 17:49:41 -07:00
Sugu Sougoumarane a28b120196 tabletserver endtoend: nocache_tests all done 2015-10-05 20:56:54 -07:00
Sugu Sougoumarane 971f5a94c4 tabletserver endtoend: health check
Also changed DebugVars fetch delimiter to be '/' because some tags
may contain '.'
2015-10-05 16:43:18 -07:00
Sugu Sougoumarane 7c99b152ed tabletserver endtoend: more tests migrated
TypeLimits, BindInSelect, QueryRules
2015-10-04 18:53:24 -07:00
Sugu Sougoumarane 5c84087b0c tabletserver endtoend: ExecuteBatch tests 2015-10-04 11:36:29 -07:00
Sugu Sougoumarane d51a37779b tabletserver endtoend: consoildation test
The race detector found a bug in the QueryExecutor. It probably
hasn't failed on production because the racy code paths were always
trying to set the variable to the same value.
2015-10-03 19:26:23 -07:00
Sugu Sougoumarane f523f628c4 tabletserver endtoend: config tests done 2015-10-02 22:08:02 -07:00
Sugu Sougoumarane fac3a448ad tabletserver: deflake some tests 2015-10-02 17:23:49 -07:00
Sugu Sougoumarane 37d004837f tabletserver: test cleanup
remove tests that have become obsolete so far.
I'm also removing the corresponding SET functionality support.
2015-10-02 16:15:32 -07:00
Ammar Aijazi 71127afcf8 Disable some tests that don't work for all clients 2015-10-01 18:12:50 -07:00
sougou b43a7c4419 Merge pull request #1151 from youtube/suguwork
tabletserver endtoend: WIP
2015-10-01 10:17:26 -07:00
Ammar Aijazi 5c65d6073a Merge pull request #1150 from aaijazi/aaijazi_stop_parsing_errors_in_python_client
Stop parsing errors in python vtgate client
2015-09-30 16:28:17 -07:00
Sugu Sougoumarane 355bed457f tabletserver: reorg some timeouts
queryTimeout moved from QueryEngine to TabletServer.
poolTimeout moved from TxPool to TabletServer, and renamed to
beginTimeout.
2015-09-30 15:30:10 -07:00
Anthony Yeh d2a5aff177 healthcheck: Re-read tablet after going SPARE when shutting down.
We were using ChangeType to go SPARE, but we were then using the
outdated tablet record to do a point update in the serving graph.
2015-09-30 15:24:55 -07:00
Ammar Aijazi e158a99f06 Add tests for vtgate_utils.extract_rpc_error 2015-09-30 15:13:16 -07:00
Ammar Aijazi d96f036b7c Addressing code review comments to fix minor style issues 2015-09-30 15:03:19 -07:00
Ammar Aijazi b839417d08 Set rpc-error-only-in-reply=False for Java tests 2015-09-29 17:19:41 -07:00
Ammar Aijazi 3b6b0276a8 Make vtgatev2 client extract errors from RPC response, and stop string parsing those errors 2015-09-29 16:56:58 -07:00
Ammar Aijazi 591a3d065a Add python client tests for transient errors 2015-09-29 13:59:37 -07:00
Ammar Aijazi a7916b9d28 Refactor python_client_tests.py to split error test cases into their own class. 2015-09-28 18:25:59 -07:00
Ammar Aijazi 6075687096 vtgateclienttest: add support for forcing errors in Begin, Commit, Rollback using callerid 2015-09-25 11:55:27 -07:00
Ammar Aijazi cabdd2c55b Add support for partial errors in vtgateclienttest errors service 2015-09-25 11:55:27 -07:00
Ammar Aijazi 8142cf80fa Support SteamExecute methods in vtgateclienttest errors service 2015-09-25 11:55:27 -07:00
Ammar Aijazi 10f6a6d725 Add more errors, with error codes, to vtgateclienttest 2015-09-25 11:55:27 -07:00
Alain Jobart 67bcb09b87 Fixing a few vtcombo-related things:
- now rebuild serving graph in vtcombo to allow range queries.
- adding vtctl VtGateExecuteKeyspaceIds command.
- added an 's' to vtctl VtGateExecuteShard to be consistent.
- pass in an empty Session to Begin in vtcombo, otherwise panics.
2015-09-24 10:44:41 -07:00
Ammar Aijazi 80f7c7072a Merge branch 'master' into aaijazi_single_gitignore 2015-09-23 17:23:40 -07:00
Ammar Aijazi 4cba9d02c1 vtdb.tablet client uses error codes to return errors instead of string parsing 2015-09-23 15:58:59 -07:00
Alain Jobart da0f6e58ef Fixed parameter I removed. 2015-09-23 13:10:26 -07:00
Alain Jobart d3c42c0941 Adding support for vtcombo in vttest framework. 2015-09-23 13:10:26 -07:00
Alain Jobart 8efc861504 WIP on vtcombo: queries now work, if they don't need a db name. 2015-09-23 13:10:26 -07:00
Ammar Aijazi 1fbe779d56 Merge branch 'master' into aaijazi_single_gitignore 2015-09-23 12:34:52 -07:00
Erez Louidor 5f295323e5 ; 2015-09-23 10:39:17 -07:00
Erez Louidor fc4dc2f7be ; 2015-09-23 10:35:51 -07:00
Erez Louidor cdf8b42ae5 ; 2015-09-23 10:32:56 -07:00
Erez Louidor 0b6b29f9d2 Merge remote-tracking branch 'upstream/master' 2015-09-23 10:32:39 -07:00
Erez Louidor 0e36c01223 Merge remote-tracking branch 'upstream/master' 2015-09-22 18:35:51 -07:00
Erez Louidor fbfdb57799 Addressed comments 2015-09-22 17:48:39 -07:00
Anthony Yeh 31087ab447 Rebalance test shards. 2015-09-22 17:19:55 -07:00
Dean Yasuda fb8d99d1af Merge branch 'master' into batch 2015-09-22 11:26:10 -07:00
Alain Jobart 4a86e49b31 Fixing this test after the SplitQuery change. 2015-09-21 12:17:09 -07:00
Dean Yasuda 604cd01259 Support ExecuteBatchShard in vtgatev2.py.
Change the vtgateclienttest/services/callerid.go test to always return
an error when callerid is handled. The error will contain word
"SUCCESS:" if callerid matches. This is necessary since falling through
breaks the expectations of the caller.

In the connection's _execute_batch call, some routing will be
keyspace_ids, and some will be by shards. This means that an
_execute_batch may create both a ExecuteBatchKeyspaceIds and
ExecuteBatchShard call. Merge the results back together.

Add tests for ExecuteBatchShard in python_client_test.py and
vtgatev2_test.py.
2015-09-18 16:10:39 -07:00
Ammar Aijazi 53be99f0a6 Get rid of directory-specific .gitignores in favor of a single global .gitignore 2015-09-17 15:48:55 -07:00
Dean Yasuda 8140617001 Combine vtgate_cursor.BatchVTGateCursor.
Since BatchVTGateCursor only adds executemany and nextset functionality,
just add that functionality to vtgate_cursor.VTGateCursor. Fix tests and
code that refers to BatchVTGateCursor.
2015-09-17 08:55:31 -07:00
Dean Yasuda 4d8cb66908 Add BatchVTGateCursor.executemany.
To comply with PEP0249, remove the BatchVTGateCursor execute and flush
sequence and use executemany instead. The first argument to executemany
is sql if all commands share a common sql (this is supposed to be an
"operation" parameter). The params_list will supply sql if the first
argument is None.

Each params in the executeany params_list generates a result set.
Implement the nextset() to walk through the result_set.

Update tests to use the new BatchVTGateCursor API.
2015-09-17 03:35:50 -07:00
Dean Yasuda 9d7614ac4f Merge branch 'master' into batch 2015-09-15 14:31:29 -07:00
Dean Yasuda 0343bd6ba4 Fix potential vtgatev2 stream cursor bug.
Always open a new connection for every stream_execute. Reusing an
existing connection may cause problems if you are in a transaction; this
logic is simpler.

Also, change the cursor._get_conn() method into a cursor.connection property.
2015-09-15 14:27:48 -07:00
Sugu Sougoumarane 59a13c7800 Merge branch 'master' into suguwork 2015-09-15 13:50:43 -07:00
Alain Jobart 8a5a3d8b1d Merge branch 'master' into replication 2015-09-14 14:48:11 -07:00
Alain Jobart bf04192ed2 Addressing comments. 2015-09-14 14:47:26 -07:00
Alain Jobart bba69d34fc Adding sandbox. 2015-09-14 08:57:26 -07:00
Dean Yasuda 2753ed386c Merge branch 'master' into callerid4 2015-09-14 08:48:40 -07:00
Alain Jobart 982db28803 First version of this doc. 2015-09-14 08:44:33 -07:00
Sugu Sougoumarane 3b3584d54d Merge branch 'master' into suguwork 2015-09-14 08:00:55 -07:00
Dean Yasuda d11c5ec854 Remove cursor effective_caller_id parameters.
Only cursor.set_effective_caller_id(effective_caller_id) is now
supported. Sending effective_caller_id as an argument to PEP0249
functions will fail or be ignored.
2015-09-14 05:34:02 -07:00
Alain Jobart 13fc216b65 Fixing failing tests. 2015-09-13 19:16:40 -07:00
Alain Jobart 838d75f7fb Merge branch 'master' into replication 2015-09-13 17:57:14 -07:00
Alain Jobart 02fa09fb8a Fixing bson python client for srvkeyspace transition. 2015-09-13 17:56:25 -07:00
Dean Yasuda 715fc9c671 Fix some lint errors, missing init. 2015-09-13 04:07:20 -07:00
Dean Yasuda 0d7f6a8b70 Merge branch 'master' into stream 2015-09-12 17:44:03 -07:00
Dean Yasuda faa72fc805 Python cursor changes.
In base cursor classes, Make set_effective_caller_id a separate call
rather than passing effective_caller_id through interfaces (cleanup to
come later).

Remove some try-except log-and-raise wrappers in vtgatev2 test methods.
The default logging, and put the logging in get_connection instead.
2015-09-12 17:15:32 -07:00
Sugu Sougoumarane d82ce0059f Add vtgatev3 to integration tests 2015-09-11 20:35:53 -07:00
Dean Yasuda 5bb9a4bc6b Allow multiple vtgate stream_execute calls.
Vtgate connection stream_execute now detaches the BsonRPCClient from the
connection and closes it after the generator exits. The connection will
quietly open a new BsonRPCClient if another execute is called.
2015-09-11 15:18:46 -07:00
Alain Jobart fe2bcecfb2 Fixing a couple exceptions. 2015-09-11 13:13:39 -07:00
Alain Jobart 80ca29cedc Small clean-up. 2015-09-11 12:50:18 -07:00
Alain Jobart 318af78ad6 Switching to beta versions of protobuf and grpc.
Fixing python clients to work.
2015-09-11 11:55:54 -07:00