Commit Graph

1365 Commits

Author SHA1 Message Date
Eric Anderson 8033cdd3a7 core: Add unit test for Contexts.interceptCall 2016-05-23 13:51:10 -07:00
Eric Anderson 39d1e31547 netty: Fix test to support netty 4.1.0.Final 2016-05-23 13:22:18 -07:00
Eric Anderson 6382015f9d internal: Split-state AbstractStream; sending and receiving
This introduces an AbstractStream2 that is intended to replace the
current AbstractStream. Only server-side is implemented in this commit
which is why AbstractStream remains. This is mostly a reorganization of
AbstractStream and children, but minor internal behavioral changes were
required which makes it appear more like a reimplementation.

A strong focus was on splitting state that is maintained on the
application's thread (with Stream) and state that is maintained by the
transport (and used for StreamListener). By splitting the state it makes
it much easier to verify thread-safety and to reason about interactions.

I consider this a stepping stone for making even more changes to
simplify the Stream implementations and do not think some of the changes
are yet at their logical conclusion. Some of the changes may also
immediately be replaced with something better. The focus was to improve
readability and comprehesibility to more easily make more interesting
changes.

The only thing really removed is some state checking during sending
which is already occurring in ServerCallImpl.
2016-05-23 12:33:49 -07:00
Carl Mastrangelo 8090effa2d netty: don't revalidate when converting between Metadata and Http2Headers 2016-05-23 11:02:22 -07:00
ZHANG Dapeng b7eea7c13a implements health check service
resolves #647
2016-05-20 14:03:29 -07:00
Eric Anderson 65dd5db5e3 protolite: Use 'unused' variable to avoid CheckReturnValue
Internally toByteArray is annotated with CheckReturnValue, which can
cause a failure during compilation if the value is ignored.
2016-05-20 09:46:46 -07:00
Eric Anderson aa92d6c643 build: Update jetty for JDK 8u92 2016-05-19 11:43:48 -07:00
Carl Mastrangelo 8c7440e141 benchmarks: add NETTY_EPOLL as an option for transport testing 2016-05-18 16:37:42 -07:00
Carl Mastrangelo e19848092d core, interop-testing: always set message encoding, and use it in interop tests
This change updates the behavior of the core compression semantics.  Previously,
if the codec was "identity", nothing was set on the wire.  This is allowed by
the spec, but doesn't match what wrapped languages do.

Additionally, the interop tests will now attempt to honor the requested
compression.
2016-05-18 12:04:25 -07:00
Carl Mastrangelo 6a802a2027 benchmarks: revert use of CMS GC 2016-05-17 10:38:59 -07:00
Carl Mastrangelo d08c167bc7 benchmarks: use Concurrent Mark and Sweep GC for benchmark worker 2016-05-16 16:44:58 -07:00
Eric Anderson 5a2e5e16a2 android-interop-test: Enable checkstyle; fix violations 2016-05-16 12:44:15 -07:00
Carl Mastrangelo 2825361767 stub: use correct javadoc link for Guava 2016-05-16 10:25:03 -07:00
Eric Anderson a70e1a4d8b interop: Don't catch AssertionError as it makes test failure confusing 2016-05-16 09:52:48 -07:00
Eric Anderson 13fe13bf9f okhttp: Enable transport test
OkHttpClientTransport has a fix for shutdown during start which
prevented transportTerminated from being called. It also no longer fails
pending streams during shutdown. Lifecycle management in general was
revamped to be hopefully simpler and more precise. In the process GOAWAY
handling (both sending and receiving) was improved.

With some of the changes, the log spam generated was immense and
unhelpful (since many exceptions are part of normal operation on
shutdown). This change reduces the amount of log spam to nothing.
2016-05-16 09:52:48 -07:00
Carl Mastrangelo 188840b920 benchmarks: update to JMH 1.12 2016-05-13 21:25:31 -07:00
Carl Mastrangelo 4e268da29b core: Don't lose server call exception when message fails to close 2016-05-13 15:59:06 -07:00
nmittler 951b5a4ca2 Adding metadata to Status exceptions.
Fixes #681
2016-05-13 15:52:06 -07:00
Eric Anderson 27dffdfe03 netty: call transportShutdown immediately on ID exhaustion
Fixes #1819
2016-05-13 13:39:47 -07:00
Jakob Buchgraber ce002bd449 core: allow ClientCall.cancel before start. Fixes #1536 (#1822) 2016-05-13 22:20:02 +02:00
Carl Mastrangelo f13fbaa782 interop-testing: update testing protos to include compression fields 2016-05-13 11:00:33 -07:00
Jakob Buchgraber 46edcad0c1 Don't enforce a timeout in stress test client. Fixes #1812 (#1823) 2016-05-13 19:18:13 +02:00
Eric Anderson 4e8cf923ca docs: Don't suggest downloading grpc-all
grpc-all is now just a husk of a JAR. Instead, users will need to
download each JAR they need separately.

Fixes #1805
2016-05-12 13:00:47 -07:00
Carl Mastrangelo f85ecdfbc4 interop-testing: Print JVM Flags by default for Stress tests 2016-05-11 13:20:23 -07:00
nmittler d9d4d8b70f Updating status codes to match the spec.
Fixes #1605
2016-05-09 13:55:50 -07:00
Eric Anderson 446f0cb85f Upgrade to Gradle 2.13
This improves our documentation for the gradle protobuf plugin, as its
version is dependent on the gradle version.

Gradle now has the --tests flag, performance improvements, and support
for OpenPGP subkeys.
2016-05-09 09:36:13 -07:00
Eric Anderson 83bf5e6f42 Fix flakiness of testConfigureDeadlineNanoTime with warmup
Without the warm up I saw large deltas, like 2,262,968ns and
1,712,558ns, on my machine. With the single-line warm up the deltas
decreased dramitically, like 385ns and 536ns. Since our times are so
much better now, decreasing the required delta to 10ms seems reasonable.

This would seem to support the theory that the flakiness was caused by
the class loader, which may even be doing I/O.

Fixes #1646
2016-05-06 09:41:46 -07:00
Kun Zhang 91b087e526 Remove an obsolete comment on ServerServiceDefinition.
Commit 9597382 introduced InternalHandlerRegistry as the main registry,
which uses a flat map from fullMethodNames to handlers, thus addressed
the original intention of this comment.
2016-05-05 09:25:04 -07:00
Kun Zhang 95973827f5 Refactor HandlerRegistry.
See #933

- Create InternalHandlerRegistry, an immutable look-up table. Handlers
  passed to ServerBuilder.addService() go to this registry. This covers
  the most common use cases. By keeping the registry internal we could
  freely change the registry's interface to accommodate optimizations,
  e.g., for hpack.

- The internal registry uses a flat fullMethodName -> handler look-up
  table instead of a hierarchical one used before. It faster because it
  saves one look-up and a substring.

- Introduces the fallback registry, settable by
  ServerBuilder.fallbackHandlerRegistry(), for advanced users who want a
  dynamic registry. Moved the current MutableHandlerRegistryImpl to
  io.grpc.util.MutableHandlerRegistry as a stock implementation of the
  fallback registry. The io.grpc.MutableHandlerRegistry interface is now
  removed.
2016-05-04 17:12:32 -07:00
Carl Mastrangelo dc80b52da6 context: Remove tests for Key Equality. 2016-05-04 16:39:55 -07:00
Carl Mastrangelo bc661e7fbb all: Finish adding tracking issues for ExperimentalApi 2016-05-03 16:15:57 -07:00
Eric Anderson 1d7a11ca24 travis: Avoid $HOME in cache, since it varies
$HOME can be different between different platforms/configurations, so
using /tmp means the path is consistent and be shared in the caches.
2016-05-03 16:09:47 -07:00
Carl Mastrangelo 0f9e3fa2ea all: Add issues for many of the experimental API annotations 2016-05-03 13:24:28 -07:00
Eric Anderson b5e6d420a3 Return Context from fork instead of CancellableContext
It is trivial to call withCancellation() after the fork().
CancellableContexts are required to be cancelled eventually, so
returning Context instead is easier when cancellation is not necessary.

Fixes #1626
2016-05-03 09:19:31 -07:00
Carl Mastrangelo b4fc929614 all: Update Readme to reflect latest release (0.14.0) 2016-05-02 15:07:45 -07:00
Carl Mastrangelo c6faf3541b Add a log message for unknown client streams 2016-05-02 14:04:19 -07:00
ZHANG Dapeng aed886d8de use Jetty ALPN agent instead of Jetty ALPN
#1497
2016-05-02 14:01:36 -07:00
Eric Anderson cd8f82871f Disable codecov comment and changes status
They are mostly noise at the moment. The 'changes' status could be
useful, but is a bit too noisy given flakiness in our coverage.
Threshold of 1% suppresses the noise for project-wide coverage.
2016-05-01 22:39:12 -07:00
Eric Anderson 41a9c94045 Disable parallel with argument for greater ease 2016-05-01 08:19:00 -07:00
Eric Anderson 80baa631a7 Use return value of Status.augmentDescription 2016-05-01 08:11:45 -07:00
ZHANG Dapeng dda4ad7441 remove the dependency on Guava's Throwables.getCausalChain #1663 (#1749)
resolves #1663
2016-04-29 19:43:21 -07:00
Eric Anderson 51548bc09d Remove m2 from Travis cache; it's unused
This is a remanent from when we were building Netty from master. Gradle
uses ~/.gradle/caches/modules-2/files-2.1/ for its Maven Central cache.
2016-04-29 15:10:37 -07:00
Carl Mastrangelo 0b3a41773c Update Release docs to account for parallel upload 2016-04-29 15:08:09 -07:00
Jakob Buchgraber 46eefe34fb Strip cause from InProcessTransport between client and server. Fixes #1716 2016-04-29 23:36:59 +02:00
Carl Mastrangelo f7dc4d2cc6 Try to use ScheduledThreadpoolExecutor 2016-04-29 13:59:28 -07:00
Carl Mastrangelo 3c5b5a5e09 Begin v0.15.0 Cycle 2016-04-29 13:54:18 -07:00
Eric Anderson f83db83391 Add unit tests for proto-based JSON marshaller 2016-04-29 10:31:43 -07:00
Jakob Buchgraber 9de87e3acd Add tests for call.cancel() from within messageRead. 2016-04-29 18:16:58 +02:00
Eric Anderson f56fdf0441 Stop producing a fat grpc-all jar
grpc-all contains a copy of all the classes and sources of "important"
artifacts. The copy causes problems when grpc-all is mixed with the
individual artifacts like grpc-netty or grpc-core, since they will
collide on the classpath. Avoiding the copy fixes the problem.

See #1597
2016-04-28 16:23:39 -07:00
Eric Anderson ac4168a236 Revert "Update proto packages to reflect directory structure"
This reverts commit 8825f355df.

The commit changed the package name of services that were used across
languages. That broke their functionality pretty severely. The changes
require more coordination with others.
2016-04-28 10:42:47 -07:00