Commit Graph

1365 Commits

Author SHA1 Message Date
Jakob Buchgraber 645bb24c6c Add private constructor to Contexts and mark statusFromCancelled experimental. Fixes #1737 and #1736. (#1738) 2016-04-28 17:12:14 +02:00
Eric Anderson 80f73a4a16 Allow cache to be shared between Linux and OS X
It doesn't appear that OS X is saving its cache yet, so this may not be
needed in the future, but for now we need OS X to avoid attempting to
use the Linux binaries.
2016-04-27 19:35:06 -07:00
Eric Anderson b0ed77ad81 Specify Status*Exception is to be used in StreamObserver.onError 2016-04-27 16:45:05 -07:00
Jakob Buchgraber cd89dde625 Fix race in StressTestClientTest.gaugesShouldBeExported(). Fixes #1695 (#1728) 2016-04-27 15:20:11 -07:00
Carl Mastrangelo 43b73f34cb Fix more null proto refs 2016-04-27 14:28:52 -07:00
Carl Mastrangelo 8825f355df Update proto packages to reflect directory structure 2016-04-27 14:16:28 -07:00
Carl Mastrangelo 0293c10161 Checking null on proto fields just ain't right. 2016-04-27 13:23:52 -07:00
ZHANG Dapeng 804991e80d validate sslContext in Netty channel/server builder #1699 (#1724)
validate sslContext in Netty channel/server builder #1699

resolves #1699
2016-04-27 13:02:43 -07:00
Kun Zhang 6b5177d3e3 Fix javadoc warning. 2016-04-27 09:57:02 -07:00
Kun Zhang 16e168951a Allow application to pass cancellation details.
Resolves #1221

Add ClientCall.cancel(String, Throwable) and deprecate
ClientCall.cancel(). Will delete cancel() after all known third-party
overriders have switched to overriding the new one.
2016-04-27 09:38:18 -07:00
Carl Mastrangelo 38a91f83e1 Fix lint warnings found on internal import 2016-04-26 13:21:25 -07:00
nmittler 7e8b504e3f Add javadoc to grpc codegen based on proto docs
Fixes #1612
2016-04-22 13:23:17 -07:00
Carl Mastrangelo 00f8f349b2 Don't allocate extra byte for each MessageFramer 2016-04-21 10:48:53 -07:00
Carl Mastrangelo 5baee2d935 Fix some corner cases with MessageFramer 2016-04-21 10:45:07 -07:00
Kun Zhang 8502730d07 Attach an exception to client-initiated CANCELLED.
This tells us where is the cancellation initiated, which is important
information for debugging.
2016-04-20 17:38:01 -07:00
Carl Mastrangelo fe7e8a00bc Use correct Guava API in stress test client 2016-04-20 11:58:39 -07:00
Eric Anderson e9b4d151de Only delete the generated code being regenerated
This fixes the problem where protobuf-nano's test generated code was
trashed any time a target that depended on protobuf-nano was compiled.
2016-04-19 12:37:42 -07:00
Eric Anderson 7fe8d8bb20 Fix change detection for compiler testing 2016-04-19 12:37:42 -07:00
Eric Anderson 9bc5d93e4a Mark generated abstract class as Experimental 2016-04-19 12:35:04 -07:00
wangyuntao 7d8ee1e9d8 some spelling mistakes 2016-04-19 08:39:20 -07:00
Jan Tattermusch 4a0c110f7d Merge pull request #1687 from grpc/java_qps_take_two
Fix QpsWorker shutdown properly
2016-04-18 16:59:21 -07:00
Jan Tattermusch 6b2727b181 Merge pull request #1686 from grpc/tweaking_java_qpsworker
Adjust Java qps worker to work well with run_performance_tests.py
2016-04-18 16:40:25 -07:00
Carl Mastrangelo d0d946ec9f new name 2016-04-18 16:21:53 -07:00
Carl Mastrangelo c4e8b1f10f Rename internal.Server to internal.TransportServer 2016-04-18 15:50:20 -07:00
Carl Mastrangelo faaaa160df Fix compilation nags for generated code 2016-04-18 15:47:44 -07:00
Eric Anderson 6ab27aba13 Update checkstyle version and sync style updates 2016-04-18 09:15:25 -07:00
Sky Ao 1d8aefad69 create AuthorityOverridingTransportFactory instance only when authorityOverride is set 2016-04-18 08:43:30 -07:00
Carl Mastrangelo 702518af22 Allow use of a global ExtensionRegistry 2016-04-15 17:36:45 -07:00
buchgr 5d22e065db Add stress test client. Fixes #1584
As of the discussion in #1584, the client does not
support TLS and interop tests that require auth are
yet to be implemented.
It has the same functionality as the C++ stress test client.
2016-04-14 17:31:26 -07:00
Kun Zhang 0f86671f8d Handle exceptions from LoadBalancer.handleResolvedAddresses()
And pass the exception to LoadBalancer.handleNameResolutionError(), in
the hope that it canb e propagated to the application, instead of
leaving the RPC hang forever.

Resolves #1407
2016-04-14 16:23:36 -07:00
Carl Mastrangelo a1725d41ad Update benchmark gradle file 2016-04-14 14:12:39 -07:00
Kun Zhang 7659f6ed68 Handle empty address list from NameResolver.
Passing an empty list to NameResolver.Listener.onUpdate() will trigger
onError(). It is documented in the javadoc and enforced by
ManagedChannelImpl.

Forbid empty address list in EquivalentAddressGroup.

Resolves #1657
2016-04-14 13:43:07 -07:00
Carl Mastrangelo 51fd870cfd Add getting the port out of a Server 2016-04-13 13:54:45 -07:00
Louis Ryan a7049bca3b Implement the load worker that can receive control events from the load driver and initiate load testing scenarios.
Will be used for GRPC's continuous load testing process.
2016-04-13 13:45:22 -07:00
Carl Mastrangelo 357878d2d6 Bump jmh version 2016-04-13 11:56:33 -07:00
nmittler 22e719a5f9 Convert Netty IOExceptions to UNAVAILABLE.
Also inspecting the entire causal chain to identify the best possible Status.

Fixes #1053
Fixes #1522
2016-04-13 11:47:58 -07:00
Kun Zhang 43439325bc Delayed transport creates real streams in executor.
setTransport() is called by the transportReady() callback, which is run
inside transport thread. When it creates real streams, it also
serializes all buffered requests, which is not supposed to be done in
transport thread. This change offloads the work to the application
executor.

Resolves #1606

Also fix ManagedChannelImplTest flakes by adding timeouts to all
verify()s on mockStream.start().
2016-04-12 16:33:58 -07:00
buchgr fd8fd517d2 Context deadline propagation should cascade. Fixes #1205
A call's timeout as specified in its metadata should be set depending
on the deadline of the call's context. If a call has an explicit deadline
set (through CallOptions), then the smaller deadline (from context and call options)
should be used to compute the timeout.

Also, a new method Contexts.statusFromCancelled(Context) was introduced that attempts
to map a canceled context to a gRPC status.
2016-04-12 21:43:49 +02:00
Lukasz Strzalkowski 363e0f6cfc Print compiler version number in generated files 2016-04-11 19:35:19 -07:00
Eric Anderson 511bea0568 Update Netty dependency to 4.1.0.CR7 2016-04-11 18:49:58 -07:00
Lukasz Strzalkowski 2fbf142a41 Provide base methods for Abstract stub
Default implementation returns status UNIMPLEMENTED. This allows adding
new methods to services without breaking existing code.
2016-04-11 16:38:23 +02:00
Xiao Hang b053d892a1 Fix proguard. Added three donotwarn for things we don't use at all in this testing app. 2016-04-08 14:24:10 -07:00
Eric Anderson 90db93b990 Pin versions on unstable packages: grpc-core internal and netty
The internal package is very unstable, so any users of it are not
compatible with alternative versions of grpc-core. The same is true for
HTTP/2 support in Netty. This primarily helps Maven users; Gradle
appears to ignore the distinction between '$version' and '[$version]'
and does not trigger a build failure.

Projects like grpc-stub don't depend on internal, so they aren't using
the version pinning. The whitelist is a bit prone to go out-of-date, but
introducing grpc-api would be the long-term solution.

Fixes #1459
2016-04-08 13:47:30 -07:00
Carl Mastrangelo 0ed059a408 Add rst error detail in OkHttp 2016-04-08 13:19:14 -07:00
Carl Mastrangelo 7d889b6911 Reuse metadata array when making http2 headers, and reduce some array copies 2016-04-08 13:08:07 -07:00
Łukasz Strzałkowski 90fbf9b274 Adapt BindableService in ServerBuilder#addService
Makes binding services to server as simple as it can get.
2016-04-08 11:14:26 -07:00
Eric Anderson 30d4f95a58 Deflake CallOptionsTest.withDeadlineNanoTime
Two prong approach: increase the tolerance and decrease code between
nanoTime() calls.

Fixes #1645
2016-04-08 10:35:40 -07:00
Eric Anderson 73a2b77ece Deflake StubConfigTest.testConfigureDeadlineNanoTime
Just bump the tolerance, based on the failures we've seen.

Fixes #1646
2016-04-08 09:45:43 -07:00
Eric Anderson b73549500c Fix POM connection from svn to git
We've never used svn
2016-04-08 08:37:07 -07:00
Lukasz Strzalkowski f8b71e72b3 Add Abstract{ServiceName} class in compiled service class 2016-04-07 17:39:17 -07:00