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

97 Коммитов

Автор SHA1 Сообщение Дата
Alain Jobart 299e3a2e4c Revert "Merge pull request #2191 from alainjobart/bind"
This reverts commit 38749981ea, reversing
changes made to 189b5b455d.
2016-11-04 10:48:25 -07:00
Alain Jobart a52629fb4f Now using querypb.BindVariable directly.
We added support for them everywhere. This makes the gRPC layer just
pass in the proto version, and changes all the unit tests.
2016-11-03 14:02:01 -07:00
sougou 92c1dca28f 2pc (#2153)
2pc: export grpc functions

* govet issue: call cancel funcs from contexts.
* Export 2PC functions as gRPC methods
2016-10-18 09:50:14 -07:00
Anthony Yeh e811b26405 vtgateclienttest: Test Unicode in query echo. (#2155)
In languages with native support, insert Unicode and encode to UTF-8.
In others, directly insert UTF-8. Check that the echo is unmangled.
2016-10-17 15:35:16 -07:00
Pavel Ivanov 3c90125150 Regenerate proto files to rename WORKER tablet type to DRAINED. 2016-10-14 15:09:50 -07:00
Pavel Ivanov 324fb4dff8 Regenerate php proto files. (#2150)
query.proto was changed at https://github.com/youtube/vitess/pull/2132 which
needs to go with these two new php files.
2016-10-13 15:52:25 -07:00
Pavel Ivanov 4269441e73 Adjust proto files for 'allprivs' user.
The addition of 'allprivs' user added TabletManager.ExecuteFetchAsAllPrivs()
method and corresponding Request and Response messages.
2016-09-26 17:47:12 -07:00
Anthony Yeh 313d926f89 Update to gRPC 1.0.0 and protobuf 3.0.0. (#2012) 2016-09-23 11:41:17 -07:00
Pavel Ivanov 2d3a213626 Regenerate php proto files. (#2077) 2016-09-22 16:47:13 -07:00
Alain Jobart b48a84ca64 Adding UpdateStream API to vtgate.
The vtgate API takes a starting timestamp, or a starting EventToken. It
will only use the starting EventToken if it's relevant. This is mostly
for tests, but could be used by real clients too to avoid the timestamp
search on the servers.

The only restriction in the vtgate routing implementation is that a
query can only end up on one shard. The stream aggregation code inside
vtgate will be added later.

This change includes:
- proto changes.
- implementing the server side interface.
- implementing the client side interface.
- adding a vtctl VtTabletUpdateStream command to stream from a given
  tablet. This is used in end-to-end tests.
- using the python vtgate_client update_stream API in all end-to-end
  tests.
- removing the python vttablet direct stream_update API.
- vtgate now better preserves remote errors through its API now, as
  withSuffix and withPrefix will preserve the error codes of all
  VtError, not just *VitessError.
- Also adding callerid vtgateclienttest tests for all API calls.
2016-09-08 07:44:41 -07:00
Alain Jobart 7de2467675 Adding EventToken, using it in binlog services.
- Adding an EventToken structure in query.proto.
- Using it in Binlog Streamer and filtered replication.
- Using it in Update Stream in POS events as well.

Note the main change there is that an EventToken has a replication
position (GTIDSet), not a transaction ID (GTID). Both server and clients
were computing the position individually anyway by accumulating
transaction IDs, might as well just send the position. And it will make
more sense for later use of EventToken.

Also, we don't set the 'Shard' field of the EventToken just yet. I'm
still not sure vttablet should do it, as opposed to vtgate.
2016-08-30 09:27:54 -07:00
Alain Jobart 869b83b73c First version of Workflow object.
In order to do that, I had to:
- Adding File/Dir APIs to topo.Backend.
- Implementing them for all flavors: memorytopo, zk, etcd, tee.
  None of the backward compatible code is there yet,
  so these can only be used for new objects.
- Adding corresponding unit tests.
- Fixing a few fake etcd-specific bugs.

Also now using CancelFunc for all topo watches.
2016-08-26 17:02:30 -07:00
Anthony Yeh f48e3ca350 Translate not_in_tx error in Java and PHP clients.
According to the mapping defined in Vitess, NOT_IN_TX translates to gRPC
canonical code ABORTED:

9e3a674ceb/codes/codes.go (L115)

In Java, this corresponds to SQLRecoverableException, meaning your
transaction is no longer valid and you must start over from the
beginning:

https://docs.oracle.com/javase/7/docs/api/java/sql/SQLRecoverableException.html
2016-08-21 16:06:17 -07:00
Pavel Ivanov 2c5dc71dd2 Update protobuf files for the changed contents of mysqlctl.StartRequest. 2016-07-26 22:57:36 -07:00
Pavel Ivanov 699c1df9e9 Update generated protobuf files.
The protobuf files are updated with the added
tabletmanagerservice.RestoreFromBackup and mysqlctl.ReinitConfig calls and their
respective Request/Response messages.
2016-07-11 15:03:16 -07:00
Pavel Ivanov 1bf760894f Regenerate php protobuf files.
Apparently these files were not generated for quite some time.
2016-07-07 09:24:15 -07:00
Alain Jobart c50bc78392 Changing sql string type to bytes in two protos.
Since we don't pass bind variables, we have to be able to send any
string we want, not just utf-8.
2016-07-05 00:28:01 -07:00
Anthony Yeh dc10fcd5de php: Regenerate protos. 2016-06-17 13:37:53 -07:00
Alain Jobart bf2ffee8ee Adding SrvVSchema object. 2016-06-02 14:07:43 -07:00
Alain Jobart 79c61e40bc Addressing comments from review.
Changing Shard's db_name to db_name_override.
Rewording a bunch of comments in proto.
Factoring out tablet creation code in vtcombo.
Rebuilding keyspace graph for redirected keyspaces too,
and also setting ShardingColumn{Name,Type} for them.
2016-05-26 07:59:57 -07:00
Alain Jobart a8731c5ce1 vtcombo now also supports vttest topology param. 2016-05-25 16:24:41 -07:00
Alain Jobart dec8332d08 Adding proto definitions for vttest. 2016-05-25 16:24:41 -07:00
Alain Jobart 525f614cd2 Merge pull request #1722 from alainjobart/locks
Locks
2016-05-25 14:24:36 -07:00
Alain Jobart 7394e2a9fc Re-generating protos. 2016-05-25 09:15:47 -07:00
Anthony Yeh 7a4bf59864 php: Add connection-wide default keyspace for VTGateV3 queries. 2016-05-23 16:43:52 -07:00
Alain Jobart d73c337514 Removing keyspace.split_shard_count. Unused. 2016-05-19 09:36:06 -07:00
Alain Jobart 2f05afec43 Removing SrvShard. 2016-05-18 07:47:20 -07:00
Alain Jobart c32483d205 Removing Endpoint from proto. 2016-05-16 10:26:53 -07:00
Alain Jobart c7f808ed98 Removing EndPoints message. 2016-05-16 07:36:19 -07:00
Alain Jobart 8902d03639 Adding result of merge (I think) 2016-05-11 07:55:57 -07:00
Alain Jobart c10a84f267 Merge branch 'master' into sparenomore 2016-05-11 07:51:05 -07:00
Alain Jobart 6d815ad12d No more healthmap in tablet. 2016-05-09 09:36:12 -07:00
Alain Jobart 5c7b385cce Removing targetTabletType from health check proto. 2016-05-09 08:18:45 -07:00
Anthony Yeh 8d91ff380d php: Update PDO submodule. 2016-05-05 23:21:40 -07:00
Anthony Yeh 26f91be6be php: php_proto build rule uses existing bootstrap image. 2016-05-05 13:16:18 -07:00
Alain Jobart a0c5e88ce3 Running PHP proto generation. 2016-05-05 07:25:28 -07:00
Anthony Yeh 7c862e9dff php: Add pixelfederation PDO adapter as a submodule.
To make it easier to find and to simplify later examples and docs.
2016-04-14 19:14:28 -07:00
Anthony Yeh 1bec360439 php: Prepare for SplitQueryV2 migration.
See #1599
2016-03-30 12:19:24 -07:00
Anthony Yeh 77d3751321 healthcheck: Add IgnoreHealthError command.
This command lets you selectively force individual tablets to temporarily
ignore health check errors that match the given regexp.
2016-03-07 17:33:28 -08:00
Anthony Yeh a4f2fa8ffc php: Strip date from generated protobuf files.
To make diffs cleaner when regenerating.
2016-03-07 17:33:28 -08:00
Anthony Yeh 1126df44cc php: Fix zero-length edge case in RowValues(). 2016-02-29 21:56:27 -08:00
Anthony Yeh 4a79b4117c php: Remove not_in_transaction parameter.
This parameter is deprecated, so we should not expose it in the new
clients.

Also removing as_transaction from executeBatch*() methods in VTGateTx
since that parameter doesn't make sense when you're calling
executeBatch*() on a VTGateTx object. If you want as_transaction, you
should call executeBatch*() directly on VTGateConn.
2016-02-08 12:44:23 -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
Rasta 455617f777 php client - VTGateConnTest - assertions with associative array result rows 2016-01-26 22:34:08 +01:00
Rasta a48efd8c0e php - StreamCursor fix 2016-01-26 20:46:51 +01:00
Rasta 435740539a php client - StreamCursor returns associative array rows (compatible with PDO::FETCH_BOTH) 2016-01-26 20:37:36 +01:00
mfris a9b1e6c2fe iphp client - VTCursor returns associative array rows (compatible with PDO::FETCH_BOTH) 2016-01-26 16:48:24 +01:00
Anthony Yeh 85e4dabe63 php: Update grpc dependency to 0.12. 2016-01-26 01:17:37 -08:00
Anthony Yeh 7630c8409a php: Run formatter for PSR-2 style. 2016-01-21 18:08:01 -08:00
Anthony Yeh 226c0fb8cb php: Make client conform to Autoloading Standard (PSR-4). 2016-01-21 18:00:04 -08:00