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

5513 Коммитов

Автор SHA1 Сообщение Дата
Michael Berlin 95b791305b wrangler: Fix wrong import for protobuf (added by 'goimports'). 2016-02-02 17:11:47 -08:00
Michael Berlin 39902f9a96 tabletmanager: Fix problem that reparent of a tablet with active filtered replication failed.
I introduced the issue in f86bb90119 where
I changed discovery.WaitForEndPoints() to require a Go context.

In case of a reparent (e.g. moving away from the current master to
slave/spare), the binlog player will be reset/stopped.

As part of that, its context will be cancelled. The same context is used
within Iteration() to wait for the list of healthy endpoints
(WaitForEndPoints()). Due to the cancelled context, WaitForEndPoints() will always return with an error and
therefore Iteration() will
never break out of Loop(). To fix this, I'm checking at the beginning of
Iteration() if the context is still valid.

I've also extended WaitForEndPoints to return a different error when it
actually did not timeout.
2016-02-01 23:37:27 -08:00
Michael Berlin 598c3bf0ed vtctl: Add WaitForDrain command.
The command blocks until a QPS rate of 0.0 was observed on all selected tablets.

The command uses the healthcheck module to continously check the current health of all tablets.

Added an integration (wait_for_drain_test.go) and end2end test (in tabletmanager.py).
2016-02-01 17:17:20 -08:00
Michael Berlin 203649e33d vttablet: Added "qps" field to healthcheck message.
This required exposing QueryEngine's QueryServiceStats instance in the tabletserver.Controller interface.
2016-02-01 17:10:46 -08:00
Michael Berlin 51b4c63686 stats: Add Rates.TotalRate() to retrieve the current total rate (across all categories). 2016-02-01 17:10:46 -08:00
Michael Berlin db0aad7cb2 tabletserver: Status page: Add comment that the QPS placeholder text will be replaced by the JavaScript graph.
This avoids confusion when you debug the HTML source code.
2016-02-01 17:10:46 -08:00
Michael Berlin ea4ea3541d tabletserver: Fix bug that QPS were drawn in the reverse order.
Because of this problem old QPS rates never moved from the right to the left. Instead, the least recent rates were shown as the most recent ones.
2016-02-01 17:10:40 -08:00
Michael Berlin faf704eab3 tabletserver: Increase sampling frequency for "QPS" stat by reducing the sleep between two samples from 60s to 5s.
Adjust the vttablet JavaScript QPS graph accordingly.
2016-02-01 00:00:29 -08:00
Michael Berlin 718260577c worker: Simplify code which waits for enough health rdonly tablets to become available. 2016-01-31 22:50:25 -08:00
Michael Berlin f86bb90119 discovery: healthcheck.WaitForEndPoints() now requires a context.
Replaced hard-coded 30s timeout with contexts with timeouts. This allows to call WaitForEndPoints() with (user-configurable) timeouts shorter 30s.
2016-01-31 22:49:33 -08:00
Michael Berlin 8fbd3829d4 discovery: Register stats for Healthcheck struct with a statsSuffix.
This is necessary when multiple Healthcheck structs are instantiated, for example when a vtctl command contacts multiple cells simultaneously. In that case, the stats suffix could be the cell name.
2016-01-31 21:24:00 -08:00
Anthony Yeh ecba7296b1 Merge pull request #1470 from shawnps/patch-2
add missing args to Fatalf call
2016-01-30 11:25:14 -08:00
Anthony Yeh 080aacda3d Merge pull request #1472 from shawnps/patch-4
fix typo
2016-01-30 11:24:53 -08:00
Anthony Yeh 751267770d Merge pull request #1471 from shawnps/patch-3
fix typo
2016-01-30 11:24:37 -08:00
Shawn Smith a412d6c72b fix method names in Errorf calls 2016-01-30 12:50:56 +09:00
Shawn Smith 41fbfc2d91 fix typo 2016-01-30 12:43:49 +09:00
Shawn Smith 107ff41761 fix typo 2016-01-30 12:43:26 +09:00
Shawn Smith 427a53887e add missing args to Fatalf call 2016-01-30 12:42:52 +09:00
Shawn Smith 43da7c34ce fix Errorf string formatting verb 2016-01-30 12:42:02 +09:00
Ammar Aijazi 5967384fe6 Merge pull request #1466 from aaijazi/aajiazi_instrument_conn_creation
Add a counter for new MySQL connections
2016-01-29 18:36:01 -08:00
Ammar Aijazi 3e7602dcac Add a counter for new MySQL connections 2016-01-29 18:23:27 -08:00
Alain Jobart e2a14d9390 Renaming xid_{type,value} to {type,value} in the proto3
entity id. Should be safe.
2016-01-29 14:19:14 -08:00
Liang 6adb187492 Merge pull request #1460 from youtube/vtgate
Fix gateway status aggregator.
2016-01-29 12:56:57 -08:00
sougou 5488e4a2b5 Merge pull request #1458 from youtube/suguwork
v3: analyze FROM clause
2016-01-28 12:49:29 -08:00
Sugu Sougoumarane bf29cf89fa v3: appendFilters -> splitAndExpression 2016-01-27 13:44:42 -08:00
Sugu Sougoumarane d48ac9bdd5 v3: address review comments 2016-01-26 20:44:55 -08:00
Liang Guo 6d144bd7e7 Merge branch 'master' into vtgate 2016-01-25 14:40:39 -08:00
Sugu Sougoumarane c312b9721f v3: Assign order to routes
In order to push ON and WHERE clauses, we need to know
the execution order of the routes.
2016-01-24 21:11:04 -08:00
Michael Berlin 04673e0d52 automation: VerticalSplitCloneTask: Fix problem that "tables" was handled like an optional parameter. 2016-01-24 18:33:58 -08:00
Michael Berlin 7135e5d314 vtworker: VerticalSplitClone: Error when --tables is not set. 2016-01-24 18:30:02 -08:00
Sugu Sougoumarane f0d9f60637 v3: add forgotten file filter.go 2016-01-24 00:31:03 -08:00
Sugu Sougoumarane eec641bca5 v3: Sharded route merge
This installment addresses all the previous review comments.
It also adds the logic to merge two sharded routes based
on the join condition.
2016-01-24 00:22:34 -08:00
Liang Guo 2fb8432050 Fix gateway status aggregator. 2016-01-22 12:59:21 -08:00
Sugu Sougoumarane fb530c02a7 v3: analyze FROM clause
This is the first installment for the new v3 analysis. This change
analyzes just the FROM clause, without the ON clauses, and identifies
possible chunks. For now, chunks are possible only for unsharded
keyspaces. Once we add ON clause analysis, we'll be able to find
chunks for sharded keyspaces also.
The new functions are currently not called from anywhere. There
are some basic unit tests for now, which will also be evolved as
functionality grows.
2016-01-21 23:48:56 -08:00
Michael Berlin 555df381de Merge pull request #1456 from michael-berlin/discovery_fixes
Fix small things around the discovery module.
2016-01-21 18:27:13 -08:00
Ammar Aijazi 44390ea443 Use the diff for InternalErrors.Schema instead of just reading the counter directly. 2016-01-20 18:30:47 -08:00
Ammar Aijazi dc2f371bc2 An error when loading schema at tablet start up shouldn't be fatal 2016-01-20 18:18:12 -08:00
Michael Berlin 6fe86e8cbf discovery: Updating help text for *_topology_refresh flag.
Removed text " when filtered replication is running" because the refresh is not dependant on a running filtered replication.
2016-01-19 16:04:56 -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 733178a705 discovery: Call Stop() on all instances of ShardReplicationWatcher.
Without this, a Go routine will be leaked which regularly loads the tablets.
2016-01-19 15:35:04 -08:00
Michael Berlin 8441a54960 discovery: Rename TopologyWatcher receiver from "ctw" to "tw".
This avoids confusing it with a "ctx" variable.

(ctw probably once was the correct receiver name because TopologyWatcher was once called CellTopologyWatcher?)
2016-01-19 15:28:24 -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
Liang 8493d976f1 Merge pull request #1433 from youtube/vtgate
Watch SrvKeyspace instead of polling in VTGate.
2016-01-14 13:49:49 -08:00
Liang Guo 100ec29ac7 Update GetSrvKeyspace 2016-01-14 11:18:17 -08:00
Sugu Sougoumarane a00fbbae25 tabletserver: allow strings for ints in SQL
This change is more flexible than the previous one.
It implicitly converts strings to ints for bind vars
as well as hard-coded values in SQL.
2016-01-13 21:18:19 -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
Liang Guo 45c12fe8d0 Update the implementation of WatchSrvKeyspace. 2016-01-13 16:04:20 -08:00
sougou d95479396d Merge pull request #1436 from youtube/suguwork
tabletserver: allow string bind vars for int cols
2016-01-12 19:40:51 -08:00
Sugu Sougoumarane bd606ea26b typo: reslovePKValues -> resolvePKValues 2016-01-12 19:23:41 -08:00
Sugu Sougoumarane 4c37277efb tabletserver: allow string bind vars for int cols
PHP is not very good at differentiating strings from ints. So,
we have to be more forgiving, especially when strings are received
where ints are expected.
For now, I'm allowing just this. Other implicit type conversions
are unsafe. In particular, 0x... notation is treated differently
in MySQL for strings.
2016-01-12 17:58:16 -08:00
Michael Berlin dfe3631643 Merge pull request #1435 from michael-berlin/vtgate_fix_typo
vtgate: Spelling fixes.
2016-01-12 15:50:14 -08:00
Michael Berlin ecd9d36bb0 topotools: Spelling fixes. 2016-01-12 15:25:00 -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 288d91f0cc Merge pull request #1431 from michael-berlin/remove_applyschemashard
vtctl: Remove old, now unused, ApplySchemaShard code.
2016-01-12 14:42:59 -08:00
Liang Guo e31065e397 Watch SrvKeyspace instead of polling in VTGate. 2016-01-12 13:56:56 -08:00
Alain Jobart 6cef6d30a4 Merge pull request #1428 from Rastusik/osx
Compatibility with OSX. The commit also contains instructions for set…
2016-01-12 12:15:30 -08:00
thompsonja 935c201ba6 Merge pull request #1430 from thompsonja/add_vtctl_command
Add GetKeyspaces to vtctld
2016-01-12 08:15:07 -08:00
Michael Berlin 23a4d6cb83 automation: Add unit test for vertical split cluster operation. 2016-01-12 06:19:42 +01:00
Michael Berlin be5249ea13 automation: scheduler unit test: Better log the found output. 2016-01-12 06:19:42 +01:00
Michael Berlin 526aca8e2e vtworkerclient: Add UnregisterFactoryForTest().
This way, different fakes can be used in the same package. This was already done for vtctlclient.
2016-01-12 06:19:42 +01:00
Michael Berlin 00117b48ff vtctl: Remove old, now unused, ApplySchemaShard code. 2016-01-12 06:13:46 +01:00
Joshua Thompson 8f0414cbe9 Add GetKeyspaces to vtctld 2016-01-11 20:29:44 -08:00
sougou 4a903777fe Merge pull request #1429 from youtube/sugudoc
V3 high level desgin
2016-01-11 18:05:48 -08:00
sougou 94726df11d Merge pull request #1425 from youtube/suguwork
tabletserver: insert...select must lock rows
2016-01-11 16:12:26 -08:00
sougou 24a7ec7e0c Update doc.go
Pointing it to the renamed file.
2016-01-11 16:09:07 -08:00
Michael Berlin 73a007bc4d automation: Add cluster operation for vertical split. 2016-01-12 00:41:12 +01:00
Michael Berlin e16b226589 automation: Generalize CopySchemaShard task to prepare it for vertical split. 2016-01-12 00:22:40 +01:00
Michael Berlin 1c66ee2987 automation: More detailed error message when a task could not be instantiated. 2016-01-11 23:42:32 +01:00
Michael Berlin e5a116173a topo: Added helper function KeyspaceShardString.
Updated go/vt/automation to use it.
2016-01-11 23:41:24 +01:00
Rasta 142f84b7f5 Compatibility with OSX. The commit also contains instructions for setting up Vitess on OSX. 2016-01-11 23:29:40 +01:00
Michael Berlin 208e802fe6 vtworker: Fix typo. 2016-01-11 23:18:47 +01:00
Anthony Yeh c8eddecdf1 Remove confusing log messages in serving graph rebuild.
These were logged originally to verify that contention was rare.
If it turned out to be common in practice, we should go back to
pessimistic locking.

Contention on the serving graph has indeed been rare, but when it does
happen, these messages are confusing because they seem to indicate a
problem.
2016-01-11 12:59:22 -08:00
Sugu Sougoumarane 8b627165eb tabletserver: insert...select must lock rows
The select subquery in insert...select was not locking rows. This
introduces race conditions for self-join inserts like select(max).
So, it's safer to lock the rows we're selecting.
2016-01-08 16:31:08 -08:00
Sugu Sougoumarane 27ba4c2d73 v3: auto-convert strings to numbers if needed 2016-01-08 12:57:55 -08:00
Sugu Sougoumarane 81624920b4 v3 bug fix: []byte bind vars
v3 didn't handle []byte bind vars correctly. This fails
only in situations when there's more than one bind var of
[]byte type. I've now added a test for this specific case.
2016-01-07 15:10:08 -08:00
Alain Jobart 8d8d2d7be0 Move the test code from zktopo to zktopo/zktestserver.
That way the real binaries don't depend on 'testing'.
Side effect is the zk topo test suite is also moved to
zktopo/zktestserver.
2016-01-06 12:01:03 -08:00
Alain Jobart 87da8bcc28 Removing unused GetEndPoints vtctld API. 2016-01-06 09:59:05 -08:00
Michael Berlin 2c13da28b9 proto: Update compiled Go proto3 code using latest proto compiler. 2016-01-06 16:51:03 +01:00
Michael Berlin 0d7bc97442 wrangler: Fix CopySchemaShard integration test.
- Schema of destination tablet never must be empty.
- During CopySchemaShard, the schema of the destination changes and the fake must reflect this properly. Added SchemaFunc to FakeMysqlDaemon to realize this.
2016-01-06 15:48:46 +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
Alain Jobart 8c12844604 Merge pull request #1410 from alainjobart/replication
Properly freeing up the healthcheck resources in binlog player.
2016-01-04 13:22:57 -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
Michael Berlin 9c690fe17a vtctl CopySchemaShard: Remove nil handling in diff phase.
It doesn't seem to be necessary and I don't remember why I added in the first place.
2016-01-04 18:04:46 +01:00
Michael Berlin 1b5b290ab2 wrangler: copy_schema_shard_test.go: Check call count for "USE vt_ks" statement. 2016-01-04 16:28:08 +01:00
Michael Berlin c3d80eb735 wrangler: copy_schema_shard_test.go: Fix table name in mocked data. 2016-01-04 16:28:08 +01:00
Michael Berlin 4afb937f92 wrangler: Remove unused FakePoolConnection from copy_schema_shard_test.go. 2016-01-04 16:28:04 +01:00
Michael Berlin 6c867befd5 schemamanager: Various wording fixes. 2016-01-04 16:23:33 +01:00
Michael Berlin 0b674dd55c vtctl: Fix problem that each successful ApplySchema call always printed "null".
Fixed this by removing the unused return value tmutils.SchemaChangeResult from the ApplySchema wrangler command.
2016-01-04 16:22:30 +01:00
Michael Berlin 2473510229 vtctl: ApplySchema: Renamed flag -force to -allow_long_unavailability.
schemamanager: Log warning that the flag is set only if it's actually a big schema.

Added integration test using VtctlPipe. The test is based on copy_schema_shard_test.go.
2016-01-04 16:20:58 +01:00
Shengzhe Yao ac28e233e8 Support big schema change in schema manager.
There is currently no big schema change support in open source;
therefore, it is better to allow schema manager to do big schema changes
without enfocing 100,000 rows limit. Add flag "-force" for vtctl command
"ApplySchema" so it accepts big schema changes.
2016-01-04 15:42:17 +01:00
Matt Harden e045549692 Fix recorded start time for transaction calls
Fixes issue #1412
2015-12-30 20:56:02 -08:00
Alain Jobart 6c061ba9d2 Properly freeing up the healthcheck resources in binlog player. 2015-12-28 08:57:20 -08:00
Yim 4dfa0226a7 Fixed misspellings 2015-12-28 15:46:11 +08:00
Liang e5751c8067 Merge pull request #1398 from youtube/vtgate
Update replication lag filter to return at least 2 items.
2015-12-22 11:52:29 -08:00
Alain Jobart de95fc3989 Adding doc on how to import protos. 2015-12-22 09:44:35 -08:00
Liang Guo 9bd77fd212 Updated replication lag selection logic, so we only include the 2nd one when its lag is less than the flag and originally there is only one left after the selection.
Also updated some text for the status page.
2015-12-21 15:25:46 -08:00
Liang 325ddd1968 Merge pull request #1399 from youtube/healthcheck
Add check in healthcheck to detect timeout.
2015-12-18 16:47:49 -08:00
Liang Guo d6a0f27d3f Add Close func to HealthCheck. 2015-12-18 15:15:42 -08:00
Michael Berlin 0600fd9c4a automation: Add task for vtctl RebuildKeyspaceGraph.
Fix issues in MigrateServedTypes actuator/task ("cell" -> "cells",
reordered parameters such that the vtctld address is the last one).

automation unit tests: Check that all fake results were consumed.

fake vtctl client: Added support for registering the same result for the
same command multiple times. The reference count is decreased every time
the result is streamed.

NOTE: This is an automated export. Changes were already LGTM'd internally.
2015-12-17 20:25:34 -08:00
Liang Guo 03f324c767 Add check in healthcheck to detect timeout. 2015-12-17 20:24:32 -08:00
Liang Guo 430ee6c31f Update replication lag filter to return at least 2 items.
It is to avoid overloading 1 endpoint.
2015-12-17 09:49:27 -08:00
Liang Guo a15fbf3207 Update vtgatev2 test to better support testing gateway implementations. 2015-12-16 15:05:17 -08:00
Michael Berlin 78447ad4cc Merge pull request #1394 from michael-berlin/vtworker_rpc_log_always
vtworker: Log output of vtworker commands executed via RPC.
2015-12-16 10:35:40 -08:00
sougou 78f13a799c Merge pull request #1395 from youtube/suguwork
tabletserver & v3: fix case sensitivity bugs
2015-12-16 10:02:37 -08:00
Sugu Sougoumarane 78aaaf2ead tabletserver: case sensitive columns in schema
The schema stores mysql columns as mixed case even though
they're not case sensitive. So, we need to cannonicalize
them when loading the schema.
2015-12-15 20:27:49 -08:00
Michael Berlin a4d1c3e629 vtworker: Log output of vtworker commands executed via RPC.
One vtworker command may be very long running (on the order of days). If the command is executed via an RPC, the output of the command is currently only stored in memory. There are several situations where this output may get lost halfway:
- if vtworker crashes
- if the consumer crashes and vtworker gets reset

From an operations perspective, we want avoid this and preserve the output instead.

Therefore, the output of each RPC will be logged to the console (and consequently, depending on the flags of the Go log package, to a file as well).

NOTE: The previous code also set a NewMemoryLogger() for the Wrangler. But this wasn't actually necessary.
2015-12-15 19:02:11 -08:00
Sugu Sougoumarane e8be6a221e v3 schema: lower case column names
Force all column names to be lower case since
they're case insensitive.
2015-12-15 18:21:36 -08:00
Alain Jobart 89598de963 Running gofmt -s -w on the source tree. 2015-12-15 15:38:45 -08:00
Alain Jobart c4d4963907 Adding trace spans for 3 areas in tabletserver. 2015-12-15 10:46:40 -08:00
Alain Jobart 70e6d1a664 Merge pull request #1391 from alainjobart/resharding
Adding vtctl RPC interface to vtcombo, with unit test.
2015-12-14 11:39:16 -08:00
Alain Jobart 09cec278b1 Updated comment. 2015-12-14 10:30:54 -08:00
Michael Berlin d6049b3e08 Merge pull request #1390 from michael-berlin/vitessdriver
vitessdriver: Set default values in OpenWithConfiguration() + fix db.Ping() comment.
2015-12-14 10:06:38 -08:00
Alain Jobart a4f7936c23 Adding vtctl RPC interface to vtcombo, with unit test. 2015-12-14 08:02:41 -08:00
Michael Berlin 5c44fbda29 vtclient: Pass --vtgate_protocol into Go SQL driver configuration.
Otherwise tests will always be executed with "grpc" driver. This fails when a BSON RPC vtgate is used in the tests.
2015-12-13 20:16:33 -08:00
Michael Berlin 367ad78797 Merge pull request #1384 from michael-berlin/go_sql_driver_godoc
vitessdriver: Added godoc.
2015-12-13 19:06:34 -08:00
Michael Berlin a1568dccd7 vitessdriver: OpenWithConfiguration helper now sets default values for empty fields.
Added respective unit test.
2015-12-13 19:06:15 -08:00
Michael Berlin 5847d2ba2b vitessdriver: Fold tests for drv.Open() for v3 and v1 JSON strings into one test using testcases.
Added test that default values which are omitted from the JSON string, will be set correctly.
2015-12-13 19:03:58 -08:00
Michael Berlin 1f213b0147 vitessdriver: Remove comment that db.Ping() would not be required.
I confused sql.Open() with sql.Driver.Open(). The first one is the general Go interface which still requires db.Ping() to check if a connection works. Driver.Open() is not related to this at all. (It gets called when the Go sql package actually opens the connection e.g. when db.Ping() is called.)
2015-12-13 18:30:05 -08:00
Michael Berlin 140b21048c vitessdriver: Addressed reviewer comments on godoc (second round). 2015-12-13 18:19:07 -08:00
Liang 6869c27034 Merge pull request #1388 from youtube/vtgate
Update Gateway to support tracking the status of its endpoints.
2015-12-11 15:26:05 -08:00
Liang Guo 46ee07cdf9 Update gateway status aggregator. 2015-12-11 13:46:02 -08:00
sougou 1222f243b8 Merge pull request #1389 from youtube/suguwork
tests: fix rowcache_invalidator flakyness
2015-12-10 16:17:12 -08:00
Sugu Sougoumarane b42d25c142 tests: fix rowcache_invalidator flakyness
memcache seems to start up slow sometimes. Give the sanity check
a higher timeout to account for it.
2015-12-10 15:49:28 -08:00
Liang Guo a69303004a Update Gateway to support tracking the status of its endpoints. 2015-12-10 15:07:38 -08:00
Alain Jobart d25f85af09 Fixing wrap around in minutes in vttablet's QPS graph. 2015-12-10 13:51:10 -08:00
Michael Berlin 7270107c8a vitessdriver: Adressed reviewer comments in godoc. 2015-12-10 13:17:37 -08:00
Alain Jobart 952ef62607 Changing file names to match other directories. 2015-12-10 06:56:36 -08:00
Alain Jobart f46bd25d3e Adding vtctld functionnality to vtcombo. 2015-12-10 06:56:36 -08:00
Alain Jobart b262ce604c Moving vtctld core into go/vt/vtctld. 2015-12-10 06:56:36 -08:00
Alain Jobart 6490f71f64 Last code move before moving to vt/vtctld. 2015-12-10 06:56:36 -08:00
Alain Jobart f3550f4fbb Forgot this file. 2015-12-10 06:56:36 -08:00
Alain Jobart de3e59415b Further refactoring of vtctld to prepare the move. 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 432575b187 Refactoring the vtctld explorer plug-ins. This is much simpler. 2015-12-10 06:56:36 -08:00
Alain Jobart 01ce263185 Removing two unused files. 2015-12-10 06:56:36 -08:00
Michael Berlin 45544ca7c5 Merge pull request #1383 from michael-berlin/go_sql_driver_shard
vitessdriver: Add helper methods and refactor tests.
2015-12-09 21:48:24 -08:00
Michael Berlin c3a14d1d78 vitessdriver: Added godoc.
I've included generic information about Vitess and also more details on vtgate for the following reasons:

My goal is to list our Go SQL driver here: https://github.com/golang/go/wiki/SQLDrivers

If we get listed, it will link to: https://github.com/youtube/vitess/tree/master/go/vt/

Somebody who clicks the link, will see the content of README.md first and this will be their initial contact with Vitess. From there, they'll hopefully go to vitess.io or the godoc page :)
2015-12-09 21:32:37 -08:00
Michael Berlin 1cac551354 vitessdriver: Replace occurrences of v2 with v1 because that's what I actually meant. 2015-12-09 21:10:16 -08:00
Michael Berlin e7d68b78f7 vitessdriver: Fold TestQueryStreaming into TestQuery.
Fixed testing streaming queries in v3 mode ("streaming" option got accidentally lost when I added the v2 mode).

Added support for streaming queries for v2 mode in test.
2015-12-09 21:08:31 -08:00
Michael Berlin 2475347743 vitessdriver: Refactor tests to use the Go SQL interface.
Before this change, the tests did test the implementation itself without going through the Go SQL interface. I think this change makes more sense because we test now the behavior through the SQL interface and that's what the user is expecting in the first place.

Other changes:
- used test description in test errors
- replaced t.Errorf with t.Fatalf where it made sense
2015-12-09 21:06:00 -08:00
Sugu Sougoumarane 4b8644690f sqltypes: allow tiny, medium and long blob types
It turns out that MySQL can return those types, but likely
only if the data size exceeds certain limits.
2015-12-09 21:04:18 -08:00
Michael Berlin 9c8102a937 vitessdriver: Refactored tests for Open().
Renamed TestDial to TestOpen and split out different tests into multiple methods.
2015-12-09 20:54:40 -08:00
Michael Berlin a744f640ea vitessdriver: Provide helper functions to open database.
Updated current users vtclient and client.go accordingly.
2015-12-09 20:50:34 -08:00
Michael Berlin e80012837b vitessdriver: Document NumInput() implementation. 2015-12-09 20:48:40 -08:00
Michael Berlin aa3782b9a9 vitessdriver: Factor out configuration into own struct. 2015-12-09 20:48:12 -08:00
Michael Berlin 089ba4a163 Merge pull request #1378 from michael-berlin/go_sql_driver_shard
Go SQL driver: Rename package from "client" to "vitessdriver".
2015-12-09 16:10:58 -08:00
Anthony Yeh 5f14258367 etcdtopo: Implement unconditional updates.
We just started using this for UpdateTablet, and it turns out it was
never implemented for etcdtopo.
2015-12-08 18:01:42 -08:00
Michael Berlin dfbb412973 vtclient: Fix go lint error ("ID" must be all caps). 2015-12-08 17:20:03 -08:00
Michael Berlin 31805ff272 Go SQL driver: Renamed package from "client" to "vitessdriver".
This is more explicit. The Go "sql" package also talks about "drivers": https://golang.org/pkg/database/sql/

To get a sense how other drivers are named, here's a list: https://github.com/golang/go/wiki/SQLDrivers

We decided to have "vitess" in the name as well to make it clear in application code that this is the Vitess Go SQL driver.

also: Renamed main files from client*.go to driver*.go.
2015-12-08 17:19:57 -08:00