Commit Graph

1818 Commits

Author SHA1 Message Date
dapengzhang0 7d85e73b23 ForwardingClientCall.getAttributes should call delegate 2017-01-24 09:11:23 -08:00
Eric Gribkoff 5bae984a88 services: remove no-op call in reflection service test
Now that the fix for #2444 is in, there's no need for the initial noop call.
2017-01-23 17:56:13 -08:00
Carl Mastrangelo 40bc50212b core: remove with* methods from MethodDescriptor 2017-01-23 15:41:40 -08:00
Lukasz Strzalkowski b33d3cb170 core: rename getAttr() and use standard getAttributes() 2017-01-23 15:06:00 -08:00
Łukasz Strzałkowski 8882abaa09 core: rename attributes() -> getAttributes()
Make it consistent with its counterpart, ClientStream#getAttributes()
2017-01-23 15:04:51 -08:00
Carl Mastrangelo efbcd1f1b9 core: change method descriptor to be builder based 2017-01-23 12:29:35 -08:00
Eric Anderson e9fa8c99ce core: Only use scheduled executor for timer tasks
This removes an abuse of scheduled executor in ManagedChannelImpl. The executor
was used to avoid deadlocking. Now we run the work on the same thread, but
delay it until locks have been released.

There is no need to fix ManagedChannelImpl2. Due to its different
threading model it didn't have need to abuse the scheduledExecutor.

Fixes #2444
2017-01-23 11:24:25 -08:00
Eric Anderson 06c40dccc3 android: Fix ProGuard rules in Android apps
Fixes #2207. This is actually a workaround. Ideally users shouldn't need
to -keep classes, but it's a bit risky to fix the real issue before 1.1.
The further fix will be done as part of #2633.

The interop app's build.gradle change is necessary to compile with newer
Gradle versions. The com.google.errorprone.annotations was necessary in
order to prevent annotation warnings from failing the build.
2017-01-23 09:11:09 -08:00
Carl Mastrangelo a4e481b3f9 core: make ServiceDescriptor check input values
Fixes: #2357
2017-01-20 17:22:14 -08:00
Kun Zhang 737cd16a38 core: make StatsContextFactory setters protected (#2634)
These are only used in internal tests.  In production,
StatsContextFactory is loaded by the "Instrumentation" library and must
be one per process, thus we won't allow setting it on a per-channel or
per-server basis.
2017-01-20 17:20:44 -08:00
ZHANG Dapeng 018e2d5307 all: make some api non-experimental for 1.1 2017-01-20 16:34:56 -08:00
Kun Zhang 8a4c7bdf7f docs: clarify requirements of detach(). (#2630) 2017-01-20 15:31:04 -08:00
Eric Anderson 2bd74c5a92 core: cancel RPC when exception in server onReady
Fixes #2305
2017-01-20 10:47:11 -08:00
Eric Anderson f51316b84a testing: Move echo interceptors out of TestUtils
The interceptors are quite specific, and probably not helpful for
current testing strategies. They really are only useful for interop
testing. Moving them to interop-testing avoids them appearing to be in a
public API (even if that API is experimental).

No functional changes were made; just code movement.
2017-01-19 17:04:31 -08:00
Carl Mastrangelo d5eb248737 all: bump to netty 4.1.7 2017-01-19 15:24:26 -08:00
Lukasz Strzalkowski 060eb45623 Rename attributes() to getAttributes() to make it consistent 2017-01-19 12:53:54 -08:00
Carl Mastrangelo 4988d8be6b thrift: disable export of artifact
Addresses: #2099
2017-01-19 12:48:55 -08:00
Eric Anderson 1e99b299e1 all: ErrorProne fixes and avoid @Beta in Guava 2017-01-19 12:16:05 -08:00
Kun Zhang 5a4794f2c8 core: add debug information in MessageDeframer. (#2622)
So that MessageDeframer would include the class name of the enclosing
stream when emitting errors.  This should give us more information about #2157
2017-01-18 17:23:29 -08:00
Kun Zhang fa8f1150cb docs: fix deprecation reference in ClientAuthInterceptor. (#2621) 2017-01-18 16:25:57 -08:00
Łukasz Strzałkowski 6494a17c5b RoundRobinLoadBalancer minor cleanups (#2611)
* Remove else, make it easier to read

* Ready subchanns list will be at max the same as the input list

* Make status private, add pkg-private getter for tests

* Remove empty field, cache size, simplify logic

Make list unmodifiable. Document index with GuardedBy (see #nextSubchannel())
2017-01-18 14:40:30 -08:00
Kun Zhang d0d2c1e796 docs: add links to examples and tutorials. (#2614) 2017-01-18 09:06:45 -08:00
ZHANG Dapeng d87a6587a4 core,netty: add getAttributes to ClientStream and ClientCall (#2526)
add `getAttributes()` to `ClientStream` and `ClientCall` to be able to share clientTransport
information such as socket TOS with higher lever API's, once the RPC picks up an active transport that is ready to use.
2017-01-17 20:33:37 -08:00
Carl Mastrangelo c4642f8b3d compile: add std:: to all stl types 2017-01-17 12:50:25 -08:00
Kun Zhang 527d243ec0 core: more logs in ManagedChannelImpl. (#2606)
They have already been added to ManagedChannelImpl2.

Resolves #2299
2017-01-17 09:36:02 -08:00
Eric Gribkoff d59973c925 core,services: separately index mutable and immutable services
Updates the proto reflection service to process immutable services once and
mutable services as-needed.
2017-01-13 17:46:56 -08:00
Kun Zhang c436d93f07 core: ServerImpl returns shared resources at termination (#2605)
Previously it does it at shutdown, which was wrong because executor may
still be used before the server is terminated.

Resolves #2034

Uses ObjectPool to make this change testable.  Cleans up test and makes
it mostly single-threaded, except for two deadlock tests that have to be
multi-threaded.
2017-01-13 09:00:32 -08:00
Carl Mastrangelo ec7f00a272 core,testing: make MethodDescriptor final and add Test helper 2017-01-11 17:30:14 -08:00
Carl Mastrangelo ce3a94bacc core: promote experimental methods in MethodDescriptor 2017-01-11 17:07:53 -08:00
Jorg Heymans 5408b92fd4 documentation: fix SECURITY.md example 2017-01-11 13:28:07 -08:00
Carl Mastrangelo b5b9ba5604 core: fix bug with Metadata merging 2017-01-11 13:23:46 -08:00
Carl Mastrangelo 3144a4fcd6 proto: remove deprecated methods 2017-01-11 13:23:02 -08:00
Carl Mastrangelo 8493498a54 core: remove thisT() from API 2017-01-11 12:46:47 -08:00
Carl Mastrangelo 813cb090af core: make getResponseMarshaller experimental in MethodDescriptor 2017-01-11 11:22:01 -08:00
Carl Mastrangelo 85bb0a100d core: make Contexts, ResolvedServerInfoGroup, and ServerInterceptors final 2017-01-11 10:47:17 -08:00
Carl Mastrangelo 8e463ce1a8 core,stub: remove deprecated deadline methods 2017-01-10 15:54:38 -08:00
Kun Zhang d17a7b5bd4 core: abstract channel builder to accept LoadBalancer2 (#2583)
If a LoadBalancer2 is passed in, the builder will create ManagedChannelImpl2 instead of ManagedChannelImpl. This allows us to test the LBv2 classes on a large scale.
2017-01-10 15:30:12 -08:00
Kun Zhang a3a5420922 context: don't log to logger in static initialization. (#2581) 2017-01-10 11:10:15 -08:00
Eric Anderson de10b94128 readme: Downgrade protoc to 3.0.2 to match grpc-protobuf
Protobuf runtime 3.0.2 is included transitively via grpc-protobuf
v1.0.3. Protoc doesn't have to match the version identically, but must
not be newer than the runtime. We must wait until v1.1 release of grpc
to bump protobuf version in the readme.

Fixes #2578
2017-01-10 11:09:49 -08:00
Kun Zhang 7cb0497767 core: ManagedChannelImpl2. (#2530)
1. Adapt to LoadBalancer2 interface.  Channel holds on to a single
   DelayedClientTransport2.

2. Lock-free: every channel state mutation, including Subchannel
   mutations, calling into LoadBalancer, idleness and shutdown, is made
   from channelExecutor.

3. Idleness grace period is no longer needed.
2017-01-09 14:44:10 -08:00
Eric Anderson cc934b0b67 testing: Remove accidental cast to char in file IO
Also add forgotten close() for the InputStream.
2017-01-09 13:52:26 -08:00
Kenji Kaneda fed9be28ca benchmarks: do not set done to true when HistogramFuture#get 2017-01-09 11:22:01 -08:00
htuch 7fbee39c3a Introduce a grpc-exp ALPN protocol identifier
This patch introduces an additional ALPN protocol, grpc-exp, intended to
take preference to h2 and indicate to the server that the connection
contains only gRPC traffic. This allows servers and intermediate boxes
to distinguish gRPC from other HTTP/2 traffic.

The choice of grpc-exp as a protocol identifier indicates that this
scheme is currently experimental and should not be relied upon. The
protocol is not in the IANA TLS registry.

This is the grpc-java equivalent of
8cdf17a620.

Due to the opacity of ALPN and TLS negotiation at application level, the
tests are only there to validate that the lists we're feeding into the
negotiation process have the desired ordering properties:

  * If grpc-exp is present, h2 is as well.

  * grpc-exp is preferenced over h2.
2017-01-09 10:40:56 -08:00
Carl Mastrangelo 4afb914939 all: update styleguide XML to canonical one on github 2017-01-09 10:19:32 -08:00
Kun Zhang ea4390cf5c context: put ContextStorageOverride in io.grpc.override. (#2570)
To make it easier to filter.
2017-01-06 08:55:29 -08:00
Carl Mastrangelo 8d49df28ee all: add max message size to client calls 2017-01-05 17:23:34 -08:00
Carl Mastrangelo 6ed3cbb143 core: fix API breakage in ServerBuilder 2017-01-05 17:22:47 -08:00
ZHANG Dapeng 4a4f25ada4 weekly cleanup: errorprone, javastyle, unused (#2566) 2017-01-05 16:13:25 -08:00
Eric Anderson 5204e4f29e releasing: Document bumping version on grpc.io 2017-01-05 13:25:05 -08:00
Kun Zhang cce8eac56d core: upgrade census (now named instrumentation) to 0.3.0 (#2565)
In upstream, Census is renamed to "Instrumentation". `com.google.census` is renamed to `com.google.instrumentation.stats`.

In gRPC, "census" in every name is replaced by "stats".
2017-01-05 10:48:13 -08:00