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

48 Коммитов

Автор SHA1 Сообщение Дата
Andres Taylor ad9c3537c1 Added LastInsertId to the grpc Session object
Signed-off-by: Andres Taylor <andres@planetscale.com>
2020-01-06 11:27:26 -08:00
yuxiaobo f886cc2681 add license in helm/misc/proto
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-10-21 17:35:53 +08:00
zwcn 440aa522bc use english quotes instead
Signed-off-by: zwcn <zilongwang61@gmail.com>
2019-06-26 19:13:16 -04:00
Sugu Sougoumarane 4e80ef467b vstream: address review comments
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-06-06 15:40:29 -07:00
Sugu Sougoumarane 0b59741632 vstream: RPC scaffolding
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-05-13 20:30:35 -07:00
Sugu Sougoumarane b4379fa078 consistent lookup: address review comments
The VCursor API is impressively simpler no.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-05-09 20:59:29 -07:00
Sugu Sougoumarane 91ea12e8e5 consistent lookup: commit order in Session
Added two new shard sessions for commit ordering:
pre and post.

Added API to set the commit order and changed
tx conn to honor it.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-05-05 19:36:42 -07:00
xichengliudui 2efaecfa67 update .md and .txt and .proto
Signed-off-by: xichengliudui <liuduidui@beyondcent.com>
2019-01-30 10:49:12 -05:00
Michael Demmer 61a253c33a add a new query.QueryWarning array to the vtgate.Session proto
To enable conveying out of band warnings, add a new proto definition
for a QueryWarning and add a repeated array to the vtgate session.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
2018-10-27 16:01:10 -07:00
David Weitzman 3c64a22828 Upgrade golang protobuf to v1.1.0
Also, simplify the protoc call by removing some intermediate tools and steps involving the python grpcio-tools wrapper.
The motivation for changing the build was that I had trouble getting the old build to work. It might just have been me.
This approach is arguably simpler because it involves fewer tools, no temp files, and no calling "sed" on the output.

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
2018-06-13 20:13:05 -07:00
Sugu Sougoumarane 0b7933cc88 messages: MessageAckKeyspaceIds
There is a need for a V2 level API for message acks.

BUG=38423920
2017-05-25 13:38:11 -07:00
Sugu Sougoumarane 7af23e1dde license: BSD->Apache v2.0
Please refer to #2694 and #2670 for motivation and reasoning for
this change.

I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.

I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.

As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.
2017-05-06 00:38:56 -07:00
Sugu Sougoumarane c3cf4ff896 v3: address review comments 2017-05-02 23:29:31 -07:00
Sugu Sougoumarane 0397f011e3 v3: new TransactionMode in Session
SingleDb is now deprecated. Legacy behavior is supported through
VTGate's Begin, etc.

The new transaction functionality is implemented in TxConn and
it uses TransactionMode instead. These will be called by the
Executor.
2017-05-02 23:29:31 -07:00
Sugu Sougoumarane 65662aa954 v3: review comments: protocol change 2017-04-28 13:08:47 -07:00
Sugu Sougoumarane ea12c8f0f6 V3: new session-based protocol
This addresses #2723.

This change is essentially a new protocol for V3. Although
backward compatible, it changes the connection model.
Basically, the newer V3 features will work only if you used
the new protocol.

The new model deprecates keyspace_shard, tablet_type and options
from ExecuteRequest and moves them into the Session. This means
that the Session is generally not empty, and may be updated
by any call to Execute or ExecuteBatch, even if the statements are
not transactional. Consequently, transactional methods like Begin,
etc. are deprecated in favor of Execute("begin").

Transaction modes will now be supported by new `SET` syntax, which
will correspondingly update the Session variable.

This also makes a connection that contains a session non-multiplexable.
We'll need to resolve whether it's still worth exposing this flexibility
to the clients, and if so, how.

For now, I've updated the Go driver to use the "modern" protocol.
However, the low level rpc (Impl) continues to support the older
functions like Begin, etc. This allows us to test the legacy
functionality.

All other clients: Python, PHP and Java are currently unchanged.

Given that this is a major protocol change, it hints at a 3.0,
but the changes are 2.1 compatible with the following exceptions:

* Go driver uses the new protocol.
* vtclient binary requires `-target` instead of `-tablet-type`, etc.

All tests are passing including PHP & Java clients. In terms
of upgrade:

* PHP and Java can be upgraded by just updating the code.
* Python will probably require a brand new library. The existing
  vtdb contains way too much baggage, and it may not be worth
  retrofitting this new incompatible protocol onto what's
  currently there. I'm looking for a name. `vtdb2`, `vitessdb`?
2017-04-28 13:08:44 -07:00
Michael Berlin 21515f5c1a java: Move all generated protobufs under io.vitess.*.
I've updated the code with a simple search and replace.

I also had to run "make proto" and regenerate the Python protobuf files because they include the Java class name in the generated code.
2017-03-30 19:51:02 -07:00
Sugu Sougoumarane 021fbe0801 v3 keyrange: proto keyspace->keyspace_shard 2017-03-23 11:32:42 -07:00
Sugu Sougoumarane 5dedb90ac1 v3: autocommit support 2017-03-23 11:32:42 -07:00
Sugu Sougoumarane 16320b42ed messages: WIP
VTGate gRPC
2017-01-23 17:03:27 -08:00
harshit-gangal 020530835b VTGate - Execute Batch V1 (#2304)
* Initial Changes

* Flow till router

* fixed test

* Code Refactor

* Adding QueryResponse type

* Resolved proto

* proto changes

* Revert "proto changes"

This reverts commit 736bc378b76853f2b5ab77ad3e850f3aa890d858.

* Comment changes

* fixed test

* Incorporated Comments
2016-12-19 23:29:19 -08:00
sougou 7933b66e43 2pc: end-to-end (#2335)
A new SingleDb flag has been added to Begin, which would survive
through the Session. If set, any transaction that exceeds a single
shard will be failed.

VTGate acquires a command line flag: transaction_mode, which can be
single, multi or 2pc. In single mode, it will fail Begins that request
multi-shard. In multi mode, it will fail commits that request 2pc.
In 2pc mode, everything will be allowed.

The per-request flags specify what the app wants, and the vtgate flags
specify what it allows.

* 2pc: Go and python clients

For Go, the transaction mode settings are supported through
the context. This means that it will only work with go1.8.

For Python, it's a cursor constructor parameter.

* 2pc: end-to-end test
2016-12-05 16:28:44 -08:00
Sugu Sougoumarane ed1f2c53d8 2pc: export ResolveTransaction in grpc 2016-11-14 08:54:49 -08:00
Sugu Sougoumarane d92169cc27 2pc: export 2pc in grpc 2016-11-13 23:48:53 -08:00
Erez Louidor 3ca6beeabe Adding back the 'use_split_query_v2' field temporarily so
that clients can still use it until the new server code is released.
2016-11-11 13:58:49 -08:00
Erez Louidor 75c2397155 Removing SplitQuery plumbing and renaming SplitQueryV2 to SplitQuery 2016-11-04 15:09:55 -07:00
Alain Jobart 7b74d101df Adding ExecuteOptions to queries.
They are added to both to queryservice and vtgateservice.
Right now, they only contain the exclude_field_names option.

exclude_field_names is used by vttablet to strip the name from the
fields record. Note the clients don't use that yet, I want the ability
to do it first, then I'll add support for it in the clients.

Allowing ExecuteOptions in vtctl commands. That's how they're tested
now.

Side-changes:
- Removing wantFields from dbclient interface. We never want them.
- Small optimization on query fields for sequences.
2016-09-15 09:48:30 -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
Erez Louidor 57812424fd Made equal_splits use the first split_column if more than one is given, rather than complain. 2016-04-26 16:27:34 -07:00
Sugu Sougoumarane a5e601481e Merge branch 'master' into v3 2016-03-30 22:20:42 -07:00
Sugu Sougoumarane 3d2fb0c4c2 v3: optional keyspace in request
If a keyspace is in the request, tables will only be searched
in that keyspace unless the query contains explicit references.
2016-03-30 18:03:52 -07:00
Erez Louidor dd7766e9a9 Integrated the new SplitQuery RPC into Vitess. 2016-03-28 16:52:34 -07: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
Alain Jobart 94477326c5 Fixing another comment. 2015-11-03 11:20:12 -08:00
Alain Jobart 0d43efcff8 Addressing a couple comments. 2015-11-03 11:20:12 -08:00
Alain Jobart 58af79e908 Updating comments in vtgate proto. 2015-11-03 11:20:12 -08:00
Sugu Sougoumarane d12476e9fe proto: migrate EntityIds 2015-10-25 22:02:58 -07:00
Ammar Aijazi 6df8aa6133 Remove RPCError from proto3 responses where it's unused 2015-09-17 15:15:59 -07:00
Shengzhe Yao e99e9b761d add java client and grpc
1. define rules in the Maven build files to compile the data protos at build time.
2. define a new vtgate service interface that uses the proto3 data structures and
   defines an abstract service.
2015-07-31 22:16:25 -07:00
Alain Jobart 766c52b88e Adding GetSrvKeyspace to vtgate API. 2015-07-28 15:55:06 -07:00
Alain Jobart b7eac53a03 Adding split_column to vtgate API. 2015-07-20 10:24:31 -07:00
Alain Jobart ad4f444a75 Fixing case of tablet_type in protos. 2015-07-20 06:54:12 -07:00
Sugu Sougoumarane a89285b69c vttablet: AsTransaction for ExecuteBatch
As mentioned in the previous change, changing the vttablet
batch API to accept an AsTransacton flag.
Implementation and test changes will follow.
2015-07-17 04:14:33 -07:00
Sugu Sougoumarane b25527db03 vtgate batch API: Add AsTransaction flag
Batch requests in vttablet currently allow "begin" and "commit"
statements. They were treated as special cases where vttablet would
start a transaction if such statements were seen.
Initially, this looked flexible, but I realize that this has drawbacks.
For example, someone could issue a begin without a commit, or one could
issue begin inside begin, or a begin-commit-begin, or a "bEgIn", etc.
Checking for all these corner cases complicates the logic, and does not
add much value to the app.
This change adds an AsTransaction flag to the VTGate Batch
requests. If it's true, then the entire batch is executed in a
transaction. Otherwise, the statements are executed loosely.
Consequently, I'll be outlawing begin and commit as valid statements
inside batch requests.
The next change will be for vttablet.
2015-07-14 10:07:58 -07:00
Sugu Sougoumarane f318a82401 vtgate: proto3 changes to match batch api changes 2015-07-10 10:38:09 -07:00
Alain Jobart eac090cd50 Renaming a few proto files. Turns out the proto we use in google3
cannot have the same <package name>.<data type> as these, or we cannot
load them at the same time. So to fix this:
- renaming the conflicting ones from xxx.proto to xxxdata.proto.
- renaming vtgateservice.VTGate to vtgateservice.Vitess

Note we can still change the names I chose here, just not back to
conflicting ones. If anyone has better ideas, we can implement
in subsequent changes. This is to get the import to google3 unstuck.
2015-06-19 08:20:58 -07:00
Alain Jobart 0f667475ec Now splitting queryservice into types and RPCs. 2015-06-10 09:26:39 -07:00
Alain Jobart 229f252570 Splitting vtgateservice into structures and services. 2015-06-10 09:22:08 -07:00