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

8136 Коммитов

Автор SHA1 Сообщение Дата
sougou 143f32b5bc Update VTGateV3Features.md
Fixed review comments.
2015-11-30 17:51:44 -08:00
sougou ea11f3ab5d Rename VTGateV3.md to VTGateV3Features.md 2015-11-30 11:07:10 -08:00
sougou 013b5a85f0 Update VTGateV3.md 2015-11-28 00:19:23 -08:00
sougou d6a68d3085 Update VTGateV3.md 2015-11-27 00:31:09 -08:00
sougou bbfa773e98 Update VTGateV3.md 2015-11-26 22:17:54 -08:00
sougou d2e9b11be6 Update VTGateV3.md 2015-11-26 21:38:04 -08:00
sougou f969dc9e28 Create VTGateV3.md 2015-11-26 11:46:43 -08:00
sougou a16cae4e14 Rename VTGateV3.md to VTGateV3Design.md 2015-11-26 11:25:18 -08:00
Michael Berlin b8e3ae42e7 Merge pull request #1348 from michael-berlin/fix_cloud_storage_backup
GCS backup plugin: Adapt to new API of the GCS Go client.
2015-11-25 22:19:17 -08:00
Michael Berlin aa9dfda4d5 GCS backup plugin: Adapt to new API of the GCS Go client.
This unbreaks our Go build.

In commit b467501b2a6e4998b369e3569864906a1261972c they changed their API from one-shot commands to a client.Bucket.Object pattern.

Where we previously stored only the "authCtx" in the global instance of the GSC backup plugin, we're now keeping the instance of the GSC Go client.

Note that we're supposed to call Close() on the GSC client instance eventually. However, our backup interface doesn't foresee a Close() yet. Therefore, for now, we keep the GSC Go Client instance around once it was actively used. The cost of this "leak" is therefore minimal.

NOTE: In their new API I didn't find a way to fill in the project id. We'll need to look into it.
NOTE: This code change is untested and may not work at all. However, it's good enough to merge and unbreak our build.
2015-11-25 18:22:23 -08:00
Michael Berlin 3de2db3272 GCS backup plugin: Fix typo. 2015-11-25 18:14:38 -08:00
sougou 2341bd4101 Merge pull request #1346 from youtube/suguwork
sqlparser: change JOIN syntax to match MySQL
2015-11-25 10:45:20 -08:00
Sugu Sougoumarane b46ae81a95 v3 demo: fix to use modified vtaget API 2015-11-25 00:41:08 -08:00
Anthony Yeh 4b059f1dcc Merge pull request #1347 from enisoc/bench
Fix copy in KeyRangesOverlap
2015-11-23 23:43:04 -08:00
Anthony Yeh 0dd6311ef6 sqlparser: Avoid unnecessary buffer pre-allocation.
bytes.Buffer has its own 64-byte bootstrap area, so there's no reason to
pre-allocate a buffer less than that.

Before:

```
BenchmarkParse1-12         20000             82960 ns/op          119243
B/op        101 allocs/op
BenchmarkParse2-12         10000            111208 ns/op          126882
B/op        315 allocs/op
```

After:

```
BenchmarkParse1-12         20000             71989 ns/op          119035
B/op         88 allocs/op
BenchmarkParse2-12         10000            111424 ns/op          126225
B/op        274 allocs/op
```
2015-11-23 18:47:18 -08:00
Anthony Yeh c8e300f0ea vtgate: Clean up mapKeyRangesToShards()
Removed some unnecesary loops and allocations. Also there was no error
path in resolveKeyRangeToShards().

Before:

```
BenchmarkResolveKeyRangeToShards-12      5000000               326 ns/op
48 B/op          2 allocs/op
```

After:

```
BenchmarkResolveKeyRangeToShards-12     10000000               179 ns/op
0 B/op          0 allocs/op
```
2015-11-23 18:14:58 -08:00
Anthony Yeh f7bbee3f9a Fix copy in KeyRangesOverlap.
The form &(*first) was being used, which doesn't actually make a copy.

Also got rid of some unnecessary allocations elsewhere in key.go.

Before:

```
BenchmarkUint64KeyBytes-12        1000000              1364 ns/op
720 B/op         15 allocs/op
BenchmarkUint64KeyString-12       1000000              1778 ns/op
800 B/op         20 allocs/op
BenchmarkKeyRangeContains-12     20000000               105 ns/op
0 B/op          0 allocs/op
BenchmarkKeyRangesIntersect-12  100000000              22.8 ns/op
0 B/op          0 allocs/op
BenchmarkKeyRangesOverlap-12     30000000              44.4 ns/op
0 B/op          0 allocs/op
```

After:

```
BenchmarkUint64KeyBytes-12       50000000              25.0 ns/op
0 B/op          0 allocs/op
BenchmarkUint64KeyString-12      10000000               121 ns/op
0 B/op          0 allocs/op
BenchmarkKeyRangeContains-12     20000000              69.8 ns/op
0 B/op          0 allocs/op
BenchmarkKeyRangesIntersect-12  100000000              14.3 ns/op
0 B/op          0 allocs/op
BenchmarkKeyRangesOverlap-12     20000000               105 ns/op
48 B/op          1 allocs/op
```
2015-11-23 18:10:58 -08:00
Sugu Sougoumarane 09d5960edb sqlpraser: allow multiple tables when parenthesized
This something that MySQL allows.
2015-11-23 00:21:28 -08:00
Sugu Sougoumarane 8084edfbf2 sqlparser: change JOIN syntax to match MySQL
Specified here: http://dev.mysql.com/doc/refman/5.7/en/join.html
2015-11-23 00:04:12 -08:00
Michael Berlin 93540773c5 Merge pull request #1345 from youtube/travis_go15
Travis: Switch to Go 1.5. Fix that unit_test_race fails when a race is found.
2015-11-22 20:20:58 -08:00
Michael Berlin a597e8b8c4 tools/unit_test_race.sh: Simplify if expression. 2015-11-22 19:45:30 -08:00
Michael Berlin 29a89f2183 tabletmanager: Fix data race in timeout test.
The timeout test effectively turned the synchronous RPC into an asynchronous: Due to the hit timeout, the test method finished while the server was still executing the RPC. In such a case, the defer of the test method and the RPC server code raced for the field "fakeRPCAgent.slow".
2015-11-22 17:41:04 -08:00
Michael Berlin 941ce6279e Fix make unit_test_race such that it fails in case of errors.
Before this, the command always succeeded, even if races were found.

I'm grepping over the output of go test -race to check if there is race because there is no other way to distinguish between a found race and a flaky test.
2015-11-22 17:35:22 -08:00
Michael Berlin 522d248a74 Merge pull request #1344 from michael-berlin/vtworkerclient_separate_package_for_test
vtworkerclient: Move client test suite into its own package.
2015-11-22 16:43:30 -08:00
Michael Berlin eba54ce272 vtworkerclient: Move client test suite into its own package.
Before this change production binaries, which included vtworkerclient, unnecessarily also included all dependencies (e.g. the go/zk package) of the test suite.

vtctlclient has a similar structure. There we had already a separate package only for the client test suite. I've added comments in its package as well to document why we have a separate package.
2015-11-21 21:15:36 -08:00
Michael Berlin 1bb5269a7e vtworkerclient: Shorten interface name.
From "VtworkerClient" to "Client". This is still not in line with the Go recommendations (because vtworkerclient.Client still stutters), but better than before.
2015-11-21 21:10:49 -08:00
Michael Berlin 6f95608221 vtworkerclient: Reduce visibility of flag.
It doesn't have to be exported.
2015-11-21 21:08:38 -08:00
sougou ee59cba47a Merge pull request #1343 from youtube/suguwork
sqltypes: improve Result.Copy
2015-11-20 09:52:42 -08:00
Sugu Sougoumarane 7ae31aa871 protos: rest of the protos renamed to ...pb 2015-11-19 22:03:19 -08:00
Sugu Sougoumarane d5f6685162 sqltypes: improve Result.Copy
Consolidate allocations to one per row, since we know that uses
less CPU.
2015-11-19 17:22:48 -08:00
Alain Jobart 15903a4d8a Merge pull request #1342 from alainjobart/replication
Switching tabletconn API out of tproto.QueyrResultList.
2015-11-19 16:45:27 -08:00
Alain Jobart aa39d1ed79 Merge pull request #1341 from alainjobart/resharding
Using ShardUpdateFields in reparent in a few places.
2015-11-19 16:45:16 -08:00
Alain Jobart 904509fb26 Handling no-update case better in UpdateShardFields.
(this was needed anyway in some other code).
2015-11-19 16:31:52 -08:00
Alain Jobart 3874c68ee9 Switching tabletconn API out of tproto.QueyrResultList. 2015-11-19 16:22:40 -08:00
Alain Jobart e10162e139 Using ShardUpdateFields in reparent in a few places.
Will be more resilient to underlying shard updates.
2015-11-19 11:26:11 -08:00
Alain Jobart b7743bdae1 Merge pull request #1340 from alainjobart/resharding
Removing a few obsolete BSON structures.
2015-11-19 09:20:05 -08:00
Alain Jobart 236e754965 Removing a few obsolete BSON structures. 2015-11-19 08:36:01 -08:00
Alain Jobart 1d1fd3e271 Merge pull request #1339 from alainjobart/resharding
One change needed for import.
2015-11-19 06:39:56 -08:00
Alain Jobart 527c9fe5b3 One change needed for import. 2015-11-18 20:18:03 -08:00
Alain Jobart 04c5b30d1f Merge pull request #1337 from alainjobart/resharding
Refactoring vtgate service errors.
2015-11-18 17:29:06 -08:00
Alain Jobart 9362c57c61 Small fixes to vtgate unit tests to match empty arrays. 2015-11-18 17:11:40 -08:00
Alain Jobart 4dc2aabc9c Merge branch 'master' into resharding 2015-11-18 16:59:57 -08:00
Alain Jobart c7f000233d Cosmetic changes to this test. 2015-11-18 16:59:27 -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
Alain Jobart cb85c6ab1f Removing a couple more unused / useless methods. 2015-11-18 11:53:13 -08:00
Alain Jobart 74d0ec8441 Now renaming vtgate/proto to vtgate/gorpcvtgatecommon 2015-11-18 11:03:55 -08:00
Alain Jobart 28af24f2b7 Removing the last uses of vtgate/proto. 2015-11-18 10:53:48 -08:00
Alain Jobart 309687b3e5 Changing vtgate's Begin call to return the session. 2015-11-18 10:04:31 -08:00