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

32 Коммитов

Автор SHA1 Сообщение Дата
Anthony Yeh e8dd5a4f08 Merge branch 'master' into reparent-refactor
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-10-30 12:44:51 -07:00
yuxiaobo 03e83d6c30 add license in /go file
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-10-21 22:30:02 +08:00
tanjunchen 63c969ca7d add License in /go files
Signed-off-by: tanjunchen <2799194073@qq.com>
2019-10-12 00:31:28 +08:00
Andres Taylor 98d0428d51 Clean up of tracing
* Extracted the opentracing wrapper to it's own file
 * Commented all the public methods
 * gofmt/goimports
 * Made sure the two interceptor builders are similar

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-04-25 15:22:14 +02:00
Andres Taylor 60b4643725 Fix problems with start of tracing
Before this change, the GRPC server could get started before tracing
had been initiated, which meant that the GRPC interceptors were not
hooked up properly.

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-04-25 07:10:57 +02:00
Andres Taylor ec483e45d3 Move tracing grpc code to the trace package
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:18 +01:00
Andres Taylor dd0b5ba917 Add tracing to GRPC end points
Make sure to send span information when doing grpc call,
and retrieving span information when running a grpc server.

Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-03-27 16:51:17 +01:00
Dan Kozlowski 1a064d39f7 Removed explicit one hour timeout from vtctlclient_wrapper
Signed-off-by: Dan Kozlowski <koz@planetscale.com>
2018-06-27 12:56:32 -07:00
Michael Demmer c0a8c9c3db
Merge pull request #3943 from tinyspeck/add-grpc-client-knobs
Add grpc client knobs
2018-05-18 15:47:36 -07:00
Rafael Chacon aaf2a1898d Fix typo in flag name
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2018-05-17 16:56:54 -07:00
Rafael Chacon 0804f60ec5 Add setting to control keepalive heartbeat
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2018-05-17 16:16:15 -07:00
Rafael Chacon 0b62928884 Fix typo in flag name
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2018-05-16 15:42:55 -07:00
Rafael Chacon f6d3559def Adds gRPC client knobs to control KeepAlive and WindowSize settings
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2018-05-16 15:06:04 -07:00
Maggie Zhou c16cb354a4 Add support for gRPC Prometheus monitoring
Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
2018-05-15 23:30:16 -07:00
David Weitzman e6b1e31439 Factor out glog references for ease of dropping in an adapter to a different logging library.
Note: This is the revert of a temporary revert and has the same effect
as the original PR: https://github.com/vitessio/vitess/pull/3830

Revert "Revert "Factor out glog references""

This reverts commit 246e2898d2.

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
2018-04-20 19:40:15 -07:00
Michael Berlin 246e2898d2 Revert "Factor out glog references"
Signed-off-by: Michael Berlin <mberlin@google.com>
2018-04-20 16:44:06 -07:00
David Weitzman b0cedf1b09 Factor out glog references for ease of dropping in an adapter to a different logging library.
Signed-off-by: David Weitzman <dweitzman@pinterest.com>
2018-04-17 08:56:51 -07:00
Michael Berlin da762c1f28 grpcclient: Fix typo.
Signed-off-by: Michael Berlin <mberlin@google.com>
2018-04-10 17:41:31 -07:00
Jon Tirsen 1c1e119ada Support gRPC compression using Snappy
Use by passing the flag "-grpc_compression=snappy" to any client side
binary. If the server doesn't support snappy compression it will ignore
the client side request.

Signed-off-by: Jon Tirsen <jontirsen@squareup.com>
2018-04-10 17:39:41 -07:00
Anthony Yeh 6914580ad5
Rewrite imports to new custom URL.
This commit consists only of the changes from running the following:

```
find go -name '*.go' | xargs -n 10 -- sed -i -r -e \
  's,"github.com/youtube/vitess/go/,"vitess.io/vitess/go/,'
```
2018-02-27 12:00:33 -08:00
Michael Demmer 61e96c6174 add a concurrency-safe option to set the grpc tracing opt 2018-01-02 11:56:02 -08:00
Alain Jobart 518abd9620 Minor fixes.
Adding package docs to two packages where it was missing.
Remove 3 extra lines of code.
Re-generate vtctl doc.
2017-12-13 10:15:53 -08:00
Rafael Chacon d919535813 Refactor clients to register DialOptions 2017-12-05 10:25:26 -08:00
Rafael Chacon c5d90257f9 First pass at review feedback
* Code organization, comments and function renaming per review.
2017-12-05 10:23:06 -08:00
Rafael Chacon 2b9e51c678 Python client refactor
* General refactors for code climate
* Update python client to not use tls
2017-12-05 10:21:21 -08:00
Rafael Chacon 97625ff640 Improvements per code review 2017-12-05 10:19:27 -08:00
Rafael Chacon 1c00bc114b Add grpc auth interface and static implementation
* This commit adds an interface to implement auth plugin
  in Vitess grpc server
* It also implements an static plugin that allows client/server
  to authentic using basic auth.
2017-12-05 10:17:29 -08:00
Sugu Sougoumarane 8baed2673a grpc: use FailFast as needed
Issues #3401, #3412
Now that we always dial asynchronously, we have to make sure that
requests don't fail fast. Otherwise, we sometimes see errors if
request is made immediately after dialing; Because the connection
is not ready yet.

Consequently, dial timeouts are obsolete. So, I've removed all
usage of it.
2017-12-02 14:44:19 -08:00
Sugu Sougoumarane edebd83a9b vtgate: exponential back-off on healthcheck
The default retry delay of 2ms was essentially causing a tight
loop and a lot of spam due to the grpc retries. This is causing
increased flakyness of travis tests.

Changed the retry to back-off exponentially unless we get
responses, at which point it will reset.

Also added a custom logger for grpc that suppresses the spammy
info log.
2017-11-08 12:11:33 -08:00
Sugu Sougoumarane 2668d30351 grpc: follow guidelines recommended by grpc
grpc is moving towards error-less dialing. Failures can happen
only during requests. However, all requests currently fail with
'Unavailable' error due to a design constraint. There is currently
no way to programmatically get to the underlying error.

Due to this, we have to rely on grpc's logging to find the root
cause of failures. This is now turned on for all programs that
use the grpc client.

For now, I'm leaving the dial timeout parameters in. They'll just
be ignored. Once we're confident that this approach works, we
can clean them all up.
2017-11-01 15:42:14 -07:00
Sugu Sougoumarane 98323b0c7b grpc: improved error messages
Issues #3291, #3211, #3194
It turns out that the default grpc settings almost always make it return
a 'deadline exceeded' error no matter what the failure is.

I've now added a new flag: FailOnNonTempDialError, which fails faster
on chronic errors and returns a better error message along with the
address, etc. This should address most of the issues that were reporting
that error messages that were too vague.
2017-10-17 10:01:27 -07:00
Sugu Sougoumarane d96264cc74 grpc: standardize client and server flags
Issue #3293
* Created a new grpcclient package that always uses the
  specified grpc_max_message_size option. Changed all grpc
  dials to use grpcclient.
* Renamed grpcutils->grpccommon. It defines grpc_max_message_size.
* Changed servenv to use grpccommon.
* Moved all flag initializations to init functions. Otherwise, repeat
  of common flag initialzations can cause crashes.

Going forward, server-only flags should go to servenv, client-only
flags should go to grpcclient, and flags common to both should go
to grpccommon.
2017-10-16 17:31:49 -07:00