Commit Graph

3637 Commits

Author SHA1 Message Date
Jean de Klerk 188b4d1e51 compiler: add note about where to download precompiled version of plugin (#6022) 2019-07-29 17:08:03 -07:00
Chengyuan Zhang 99993bee13
xds: implement a server interceptor for taking server application metrics and sending to client side in ORCA format (#6018)
* Added methods in CallMetricRecorder accessor for accessing context key and creating new CallMetricRecorder instance.

* Added impl for a server interceptor that records and sends custom metric values to client side.

* Added unit test for the server interceptor.

* Modified dependencies to have xds package depends on grpc-services (for CallMetricRecorder) and grpc-testing-proto (for testing proto).

* Changed usage of GrpcServerRule to GrpcCleanupRule.

* make constant fields static

* use GrpcCleanupRule to register InProcessChannel to avoid manual shutdown.

* Make class public and match the usage of grpclb's load reporting server tracer.

* added ExperimentalApi annotation
2019-07-29 14:46:24 -07:00
Chengyuan Zhang 50df56f949
xds: add a missing test case for CallMetricRecorder and polish test data. (#6019) 2019-07-29 14:43:42 -07:00
Carl Mastrangelo 57e7bd394e
all: update to proto 3.9.0 2019-07-26 13:53:05 -07:00
Jihun Cho 65109e6738
netty: Netty{Server,Channel}Builder requires all or none of ELG and ChannelType (#6014) 2019-07-26 09:25:02 -07:00
ZHANG Dapeng 4114433674
doc: Add hint to users who want an experimental API to be stabilized 2019-07-26 09:22:53 -07:00
Chengyuan Zhang f15a6bd363
services: implement a lb policy agnostic call metric recorder for backend applications (#6004)
* services: implement a lb policy agnostic call metric recorder for backend applications.

* Renamed snapshot() to finalizeAndDump() and make it package-private with an internal accessor class.

* Added Javadoc link for Context.

* Added ExperimentalApi annotation.

* Added since annotations.
2019-07-25 15:39:22 -07:00
Carl Mastrangelo 06e9b88147
netty: bump to 4.1.38
* netty: bump to 4.1.38
2019-07-24 14:29:26 -07:00
Jihun Cho 102f0f8ac8 core: fix linter error 2019-07-24 13:52:52 -07:00
liym 47b11ab7a1 compiler: Use 'SERVICE_NAME' instead of duplicated '$Package$$service… (#5943)
* compiler: Use 'SERVICE_NAME' instead of duplicated '$Package$$service_name$'

* compiler: Align indentation

* Fix typo

* Add modified golden files and all re-generated code to meet Travis CI and Windows build requirements

See PR #5943

* Polishing
2019-07-24 10:37:13 -07:00
ZHANG Dapeng d7b9438d39
util: a util to gracefully switch load balancer when lb policy changes
Following the section "Gracefully Switching LB Policies" in the spec go/grpc-client-channel-spec
2019-07-22 13:42:07 -07:00
Jihun Cho 1fbc61b280 alts: provide channel type to HandshakerServiceChannel to suppress warning 2019-07-22 09:50:03 -07:00
Ran f261af3445
java_grpc_library.bzl: Migrate from 'proto' to ProtoInfo syntax (#5994)
* Migrate the provider containing information about protocol buffers from the old-style 'dep.proto' pattern to the new-style 'dep[ProtoInfo]' one.
2019-07-19 16:06:47 -07:00
Carl Mastrangelo cc524f10d3
netty,interop-testing: increase timeouts on tests for TSAN 2019-07-19 15:24:19 -07:00
Carl Mastrangelo 148b7de357
stub: avoid race in onHalfClose server StreamObserver 2019-07-19 12:24:34 -07:00
Carl Mastrangelo 8a9afd618a
context: fix race between CancellableContext and Context
The `pendingDeadline` variable is modified from the ctor of CancellableContext, but it isn't final.  The cancellation can happen before the variable is assigned.  It's generally bad practice to leak the this reference from the ctor to other threads anyways.

This code refactors the deadline calculation and scheduling so that `pendingDeadline` is modified under the lock, and the `this` reference is not exposed.

Discovered by TSAN.
2019-07-17 01:12:21 -07:00
Chengyuan Zhang b477cc2a47
cronet: add accessor class for CronetChannelBuilder to avoid exposing setTrafficStats* API directly. (#5983) 2019-07-15 16:46:41 -07:00
Carl Mastrangelo 25a72e1f6d
netty: don't share transport tracers across transports
Found using TSAN, which shows the number of calls succeeded being incremented from multiple event loops
2019-07-15 11:18:35 -07:00
Carl Mastrangelo c3d7d74175
interop-testing: fix race in CascadingTest
ServerCall.close() is meant to only be accessed from a single thread, but in the test it is accessed from the callbacks of several client calls.  Synchronize access to sate TSAN.
2019-07-15 11:17:54 -07:00
Carl Mastrangelo 855740622a
all: bump PerfMark to 0.17.0
* Bump PerfMark to 0.17.0

The main changes how linking is done.  Linking is now always done
through the `PerfMark` entry class.   This is for two reasons:

1.  It make instrumenting the linking calls *much* easier.
2.  It follows the API pattern of "verbNoun()".  Previous callsites
    would have `Link link = PerfMark.link(); link.link()`.  This
    stuttering is not quick to follow.

Generated using:

```
find -name \*.java -exec sed -i 's#link = PerfMark.link();#link = PerfMark.linkOut();#g' {} \;
find -name \*.java -exec sed -i 's#link.link();#PerfMark.linkIn(link);#g' {} \;
find -name \*.java -exec sed -i 's#command.getLink().link();#PerfMark.linkIn(command.getLink());#g' {} \;
find -name \*.java -exec sed -i 's#cmd.getLink().link();#PerfMark.linkIn(cmd.getLink());#g' {} \;
find -name \*.java -exec sed -i 's#msg.getLink().link();#PerfMark.linkIn(msg.getLink());#g' {} \;
```

Since the deprecated link methods are also `@DoNotCall`, the same
sed calls will need to be used on import.
2019-07-11 10:57:05 -07:00
Chengyuan Zhang d30c304d8f
xds: Fix bug of locality store not update weights for existing localities (#5976)
* Fixed LocalityStore test relying on WeightChildPicker list order for mapping to its corresponding locality.

* Fixed bug for not updating new weights for existing localities.
2019-07-11 09:44:40 -07:00
Jihun Cho 77ee79cc15 Update README to reference 1.22.1 2019-07-10 17:20:16 -07:00
Chengyuan Zhang ce830bc3bf
xds: Remove unnecessary subchannel creation by helper, use mocked subchannels directly. (#5977) 2019-07-10 16:57:02 -07:00
Lukacs T. Berki e341d4c655 Make .proto import path computation work with virtual protos in the main repository.
Also fix grammar.
2019-07-10 13:52:08 -07:00
ZHANG Dapeng d648e8f2df xds: update envoy to 89eb31bcbe2308bf1e9073620e843bf472363495 (#5972)
* xds: update envoy to 89eb31bcbe2308bf1e9073620e843bf472363495

* run import.sh
2019-07-09 21:19:53 -07:00
Jihun Cho d974bea4b1
core: fix terminated status check in TransportListener (#5955) 2019-07-09 16:36:36 -07:00
Mike Kobit 6615f2fc9d Add `@Nullable` to getter for trailers on `StatusRuntimeException` since the constructors allows it to be null 2019-07-09 15:56:42 -07:00
Adam Liddell f9e49e1261 bazel: Update netty common version 2019-07-09 15:35:15 -07:00
Chengyuan Zhang 4d30f313e1
xds: import third party envoy proto (#5929)
* xds/third_party: import envoy proto based on envoy's commit eefcd0e6fcbeba446454bd5396a34c69348338eb

* xds: fixed breaking changes introduced by changes of fields in ORCA proto message.
2019-07-09 14:20:25 -07:00
Lukacs T. Berki b220178515 java_grpc_library.bzl: Work with proto_library rules using strip_import_prefix / import_prefix
In addition to this welcome functionality, this change also makes it
possible to fix http://github.com/bazelbuild/bazel/issues/7157 by
tolerating proto_library rules using a virtual import directory.
2019-07-09 13:04:10 -07:00
ZHANG Dapeng cc13f74065
doc: Favor implementation to compile in documentation
This is a complement of #5914
2019-07-08 17:17:49 -07:00
Shuangtai Li b8d72466dd Fix gitignore for Intellij filebased import 2019-07-08 17:11:26 -07:00
ZHANG Dapeng eecd5a72bd
xds: ignore zero-weighted locality 2019-07-08 15:21:52 -07:00
Jihun Cho 722c66ef91 Update README to reference 1.22.0 2019-07-08 15:02:51 -07:00
Darrien Glasser b4e964bd15 examples/kotlin-example: Fix typo (#5957) 2019-07-08 11:59:20 -07:00
Eric Anderson 46ef51576f bazel: Add comment for public protoc plugin
The 3rd-party rules_proto project is referencing our compiler directly
and not using our java_grpc_library. This target is fine for them to
use (although we'd prefer using our java_grpc_library), but most users
shouldn't be touching it.

Related to #5942 and #5947
2019-07-03 15:04:07 -07:00
Adam Liddell f67aa4e305 Make //compiler:grpc_java_plugin publicly visible again
Prior to 745aa0a2f5, this target was
visible publicly.
2019-07-03 13:58:23 -07:00
Carl Mastrangelo 2548bcd7c7
netty: bump to 4.1.37 2019-06-28 11:40:56 -07:00
Carl Mastrangelo 9aa3981ada
netty: use varargs logger in ProtocolNegotiators 2019-06-27 15:59:43 -07:00
Carl Mastrangelo 023b9a3f14
netty: don't use InternalProtocolNegotiators in ProtocolNegotiators 2019-06-27 15:07:43 -07:00
Carl Mastrangelo 0a1805db43
netty: include pipeline on exceptions too 2019-06-27 13:04:31 -07:00
Carl Mastrangelo 1be3bd8ea4
stub,core: avoid calling onready if the call is UNARY or SERVER_STREAMING 2019-06-27 10:22:54 -07:00
Carl Mastrangelo 9e5f60b86a
netty: upstream ProtocolNegotiatiorHandler, and swap the appropriate classes to it
ALTS is not switched yet, since it is shared between client and server. Once the server is changed to use WBAEH, it can be moved too.
2019-06-26 18:23:12 -07:00
Carl Mastrangelo d5e1a4bb5d
interop-testing: support just ServerBuilder types 2019-06-26 16:47:17 -07:00
Chengyuan Zhang 36476cb1f8
xds: clean up client load reporting code (#5928)
* Cleaned up XdsLoadStatsStore.
- Renamed the StatsStore interface to XdsLoadStatsStore and its corresponding implementation is XdsLoadStatsStoreImpl.
- Revised/reworded specification for XdsLoadStatsStore.

* Cleaned up ClientLoadCounter specification.

Reworded specification for ClientLoadCounter

* Cleaned up XdsLoadReportClient, reworded specifications, formatted tests.

* Removed Xds prefix from LoadStatsStore.

* Removed Xds prefix from XdsLoadReportClient.
2019-06-26 16:27:01 -07:00
ZHANG Dapeng f0a824bb53
all: fix lint 2019-06-26 15:25:18 -07:00
Carl Mastrangelo 7895c33efa
netty: make unexpected reads fail negotiation, and log close failures
In case a negotiating handler misses a read, and it reaches the WBAEH, it should cause a failure. Also, if closing the channel fails while handling another error, log the second failure.
2019-06-26 14:43:06 -07:00
ZHANG Dapeng 1e04dcf5c9
core, examples: allow empty nonfatalStatusCodes, and integer status codes 2019-06-25 15:29:52 -07:00
ZHANG Dapeng 84f8bac8d4
xds: ADS RPC retry
Resolves #5812
2019-06-25 13:13:18 -07:00
Chengyuan Zhang e36ad47695
xds: integrate receiving and reporting OOB backend metrics in xDS load balancer (#5924)
* augmented xds child balancer helper with orcaOobReportingHelperWrapper and added an interface method in LocalityStore for updating out-of-band backend metrics reporting interval

* added an callback for passing load reporting interval received from lrs response to xDS load balancer, thus, LocalityStore for configuring OOB backend metrics reporting

* moved XdsLoadReportCallback interface into XdsLoadReportClient
2019-06-24 16:05:32 -07:00