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

54 Коммитов

Автор SHA1 Сообщение Дата
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 89598de963 Running gofmt -s -w on the source tree. 2015-12-15 15:38:45 -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
Alain Jobart 3874c68ee9 Switching tabletconn API out of tproto.QueyrResultList. 2015-11-19 16:22:40 -08:00
Alain Jobart 8827fdb5aa Replacing BoundKeyspaceIdQuery and BoundShardQuery with the proto3
version in the vtgate client and server APIs.
2015-11-16 10:01:28 -08:00
Sugu Sougoumarane 089e2bad40 more protos renamed
what's left: vtctldata vtctlservice vtgate vtgateservice vtrpc
vtworkerdata vtworkerservice
2015-11-12 01:13:51 -08:00
Sugu Sougoumarane 71469f54c5 sqltypes: all code changed to use Result 2015-11-10 00:50:46 -08:00
Alain Jobart 9b59e8f782 Removing last use of key.KeyRange in vtgate gorpc code.
And then removing key.KeyRange.
2015-11-06 09:45:04 -08:00
Sugu Sougoumarane d12476e9fe proto: migrate EntityIds 2015-10-25 22:02:58 -07:00
Liang Guo 6dba9d444f Refactor to make HealthCheck a global variable. So we can export its internal for monitoring purpose. 2015-09-18 14:25:42 -07:00
Liang Guo 1ae6b948e4 Add discoverygateway. 2015-09-16 20:50:53 -07:00
Alain Jobart 45ae76c3f4 Changing type used by ExecuteEntityIds to be the proto3 one. 2015-08-31 08:11:37 -07:00
Alain Jobart 6dfb8431fd Now using []byte instead of key.KeyspaceId in vtgate. 2015-08-28 10:05:15 -07:00
Alain Jobart 31323e8c22 Now using proto3 KeyRange in vtgate's {,Stream}ExecuteKeyRanges. 2015-08-27 17:09:18 -07:00
Sugu Sougoumarane edddb37eed vtgate test fix
There is a race condition between Balancer and ShardConn
because they both wait for the same amount of time when
a connection is unavailable. If there's only one connection,
this leads to a race condition where you may see a retry
error or a 'no endpoints available' error depending on
which timer wins.
For now, I'm fixing the test such that it avoids that
retry logic. We have to talk about how to make that part
more predictable.
2015-08-22 23:53:53 -07:00
Sugu Sougoumarane e78d03ed1f vtgate: fix defective test
TestResolverExecBatchAsTransaction was incorrect. The test was
passing because it was not checking for the correct error codes.
2015-08-21 21:20:23 -07:00
Liang Guo 361b13fcff Merge branch 'master' into vtgatecode 2015-08-13 16:18:10 -07:00
Alain Jobart 27c5c2ec3e Now converting ExecuteBatchShards and ExecuteBatchKeyspaceIds. 2015-08-12 13:26:17 -07:00
Alain Jobart 92159a08f4 now converting ExecuteEntityIds. 2015-08-12 12:21:07 -07:00
Alain Jobart 301adba7e5 ExecuteKeyRanges and StreamExecuteKeyRanges are now converted. 2015-08-12 11:24:50 -07:00
Alain Jobart 9b5ac9a3d5 ExecuteKeyspaceIds and StreamExecuteKeyspaceIds now done to. 2015-08-12 10:41:31 -07:00
Alain Jobart 1f75e8ca57 Now using pb.TabletType a lot more inside vtgate. 2015-08-12 07:52:25 -07:00
Liang Guo c04582a199 Reduce unit test flakiness 2015-08-10 15:31:50 -07:00
Michael Berlin 7ab0dde538 Make sync2.AtomicInt64 a struct instead of an int64.
This fixes the problem that the wrapped integer value can be used without having to go through the interface.

Fixed all unit tests where this problem occurred.
2015-08-05 11:47:26 -07:00
Alain Jobart c9d2544fde Replacing portmap with port_map in proto3. 2015-07-28 12:00:30 -07:00
Alain Jobart a0044c91b3 Now using proto3 EndPoint everywhere. 2015-07-28 11:05:29 -07:00
Sugu Sougoumarane 385db9b218 vtgate API: test AsTransaction 2015-07-22 07:40:46 -07:00
Sugu Sougoumarane 2380722170 vtgate batch API: ExecuteBatchKeyspaceIds impl 2015-07-22 05:05:51 -07:00
Sugu Sougoumarane 36a75b5869 vtgate batch: core functionality
Some tests are also done. But more are needed, which
will be added as the rest of the functions are wired in.
2015-07-21 14:02:32 -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 e71849c6ae vtgate: Change ExecuteBatchKeyspaceIds API
Same change as ExecuteBatchShards. Every query has its own
list of keyspace ids.
2015-07-10 02:33:24 -07:00
Ammar Aijazi 0cf64ebf00 Inside VTGate, log tabletconn.ServerErrors to Infof instead of Errorf 2015-04-29 15:00:42 -07:00
Sugu Sougoumarane 79819fbc74 vtgate: add tablet connection life
vttablet connections have to be recycled regularly to maintain
good load balance. The new conn-life flag specifies the average
life of vttablet connections.
2015-04-01 22:05:50 -07:00
Liang Guo f784cd890b Add separate parameter for per connection timeout 2015-03-03 22:51:30 -08:00
Alain Jobart 311dfc5082 Removing dummy context. 2014-12-15 11:03:01 -08:00
Shruti Patil 426fd63621 Constrain that dml is targeted for one keyspace_id. 2014-12-09 11:43:00 -08:00
Shruti Patil d528845c4f Changed format of vtgate error for easier parsing. 2014-11-05 11:23:26 -08:00
Liang Guo ebabd4d551 Add unit tests for VTGate shard_conn reconnect 2014-10-22 15:16:35 -07:00
Anand Henry cc6853b41e Refactor VTGate to use Context interface
Keep last error context in EndPointsCacheStatus
2014-07-09 12:44:11 -07:00
Liang Guo 365cffff08 Revert VTGate protocol independent change 2014-07-01 11:47:59 -07:00
Liang Guo 11baabf7d1 Move datahandle files to tabletconn 2014-06-23 11:06:02 -07:00
Liang Guo 74834c0c4e Use tablet_connection flag to determine data handler (WIP) 2014-06-20 16:44:21 -07:00
Liang Guo 7861b6a3d6 Make VTGate protocol independent (WIP)
So we can avoid unnecessary conversion.
2014-06-20 15:14:34 -07:00
Alain Jobart 6a48d25c8c Fixing unit tests to not all export the same stat. 2014-06-09 14:07:28 -07:00
David Symonds a15bd56b88 Fix dependence on map iteration order.
Go map iteration order is undefined, and the upcoming Go 1.3 release makes it more random.
2014-05-26 11:31:08 +10:00
Liang Guo 9ce065128e Update VTGate handling of keyspace redirection 2014-05-20 14:56:06 -07:00
Liang Guo ffa4430af7 Fix VTGate handling of keyspace redirection 2014-05-20 13:37:13 -07:00
Liang Guo 8cd7ac0dbe Fix VTGate flacky unit test 2014-05-19 18:27:43 -07:00
Liang Guo 5fc302d596 Update VTGate V2 2014-05-05 15:39:53 -07:00