Commit Graph

601 Commits

Author SHA1 Message Date
nmittler d9d4d8b70f Updating status codes to match the spec.
Fixes #1605
2016-05-09 13:55:50 -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
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
ZHANG Dapeng dda4ad7441 remove the dependency on Guava's Throwables.getCausalChain #1663 (#1749)
resolves #1663
2016-04-29 19:43:21 -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
Jakob Buchgraber 9de87e3acd Add tests for call.cancel() from within messageRead. 2016-04-29 18:16:58 +02:00
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 b0ed77ad81 Specify Status*Exception is to be used in StreamObserver.onError 2016-04-27 16:45:05 -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 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
wangyuntao 7d8ee1e9d8 some spelling mistakes 2016-04-19 08:39:20 -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
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
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
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
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
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
Carl Mastrangelo 2c3a63fe75 Remove some array copies in metadata 2016-04-07 12:58:44 -07:00
Eric Anderson bd87b3f739 Allow nanoTime to wrap around in Deadline
A nanoTime result must be subtracted from another result to be useful;
you must do t1 - t2 < 0 instead of t1 < t2.
2016-04-06 12:08:31 -07:00
Eric Anderson d36a03c7b1 Use ticker in Deadline testing to remove flakes 2016-04-06 12:05:14 -07:00
Carl Mastrangelo b3bc7fc499 Try out using Truth library 2016-04-05 11:33:20 -07:00
Carl Mastrangelo 5c4ff7ad08 Remove unused method 2016-04-01 14:04:55 -07:00
Carl Mastrangelo f64a02f2ef Remove Flakes caused by assertEquals 2016-03-31 16:20:40 -07:00
Kun Zhang 877e1e11eb Provide default implementation for NameResolver.refresh().
It is an optional operation anyway. In a pushing name system, refresh()
wouldn't be necessary.
2016-03-29 17:07:55 -07:00
Kun Zhang 2d15af53c7 Retry DNS resolution when there is an error. 2016-03-29 16:15:39 -07:00
Kun Zhang 575df76a8f Trigger name resolution when a live connection closed.
In addition to when all addresses have failed to connect. This is to
cover the case where some addresses have changed in the name system
while some are still there and usable. Without this change, the client
would try to connect old addresses each time it reconnects.
2016-03-29 13:50:25 -07:00
Lukasz Strzalkowski 3ea153634f Retrun InProcessSocketAddr for InProcess server streams 2016-03-25 16:17:45 -07:00
Eric Anderson 5c4817723e Warn users shutdownNow doesn't behave as documented
This just places back a warning that was mistakenly removed in b687bdc.

Fixes #1500
2016-03-25 14:34:16 -07:00
buchgr 6e679401ea Allow Deadline.timeRemaining() to return a negative time offset. 2016-03-25 22:15:30 +01:00
buchgr 32ddf9f381 Make CallOptions and AbstractStub use Deadline.
- Made CallOptions use the Deadline type instead of a
  long to represent a deadline.
- Added new methods CallOptions.withDeadline(Deadline) and
  AbstractStub.withDeadline(Deadline). The methods are
  marked experimental, as the Deadline class is marked
  experimental. These methods are meant to replace
  CallOptions.withDeadlineNanoTime(Long) and
  AbstractStub.withDeadlineNanoTime(Long), which have
  been deprecated.
- Updated CallOptions.toString() to include all fields.
2016-03-25 22:15:22 +01:00
Eric Anderson a40b686891 Revert "Refactor ExponentialBackoffPolicy"
This reverts commit a98f8afbbe.

There was no expectation across the languages that we would support
other policies for connection retry (changing a parameter would be on
the table, though).
2016-03-25 10:23:58 -07:00
Carl Mastrangelo e63bbaf8fb Merge pull request #1587 from lukaszx0/add-backoff-to-builder
Add backoffPolicyProvider to managed chan builder
2016-03-24 16:58:33 -07:00
Lukasz Strzalkowski a98f8afbbe Refactor ExponentialBackoffPolicy
This will allow new, custom, providers in the future.

We're also moving it out of internal package because it'll be
intended to use by users for providing their custom backoff
policies - `backoffPolicyProvider` method was added in order to do
that.
2016-03-25 00:12:18 +01:00
Kun Zhang 3be48b42e3 Refresh name resolution if all addresses failed to connect. 2016-03-24 14:37:49 -07:00
Eric Anderson c480cdf62f Remove cancel(Status) since it is now unused 2016-03-24 10:52:46 -07:00
Eric Anderson 3ead41141e Use stream.cancel() instead of cancel() in ClientCallImpl
Using cancel() sets cancelCalled=true which causes methods like
sendMessage() to throw IllegalStateException. This results in spurious
exceptions that are impossible to avoid. The API was designed to only
throw IllegalStateException when the caller called methods in the wrong
order, which is not the case here.

Fixes #1531
2016-03-24 10:44:50 -07:00
Carl Mastrangelo 65d3847d14 Remove references to Throwable.propagate 2016-03-22 15:47:52 -07:00
buchgr 1ff6ecbb21 Fix flaky DeadlineTest.runOnEventualExpirationIsExecuted()
The test fails frequently on my MBP. I ran the test 10
times and the deadline took at most 63ms to expire. So I
bumped the timeout to 70ms.
2016-03-22 17:46:53 +01:00
Xiao Hang 37f45e332f Add idempotent related getter and setter to MethodDescriptor 2016-03-21 15:43:26 -07:00
Lukasz Strzalkowski 14bc16e8eb Update Attributes.Key conventions
We don't need to require namespacing it's not necessery anymore
since object is used by the key, not key name.
2016-03-17 19:46:26 -04:00
Lukasz Strzalkowski c3011b0798 Move server call keys to ServerCall class 2016-03-17 19:46:26 -04:00
buchgr 3c68c053f7 Remove ReferenceCounted and add close() to ClientTransportFactory. Fixes #927 2016-03-17 00:31:04 +01:00
Lukasz Strzalkowski 6a67a97a73 Add attributes to ServerCall 2016-03-16 15:39:42 -07:00
Lukasz Strzalkowski b37ebd6482 Add Key#of and Key#keys, use key object as map key, add tests 2016-03-16 15:39:42 -07:00
Carl Mastrangelo 12dfecba62 Chnage mispeling of jvaadoc in wihtLogiD 2016-03-16 10:38:27 -07:00
elandau 053a18e209 Use Attributes as the affinity data for LB.
- Remove RequestKey.
- Rename withRequestKey() to withAffinity(), which accepts an Attributes.
2016-03-14 15:13:42 -07:00
Kun Zhang 08c74d46f5 Only link delayed transport AFTER real transport has called transportReady().
If TransportSet fails to connect a transport (i.e., transportShutdown()
called without transportReady()), TransportSet will automatically
schedule reconnection for the next address, unless it has reached the end
of the address list, in which case it will fail the delayed transport.

This will reduce stream errors caused by bad addresses appearing before
good addresses in the resolved address list.

Before this change, TransportSet would return the real transport on the
first call of obtainActiveTransport(). After this change, it will return
the delayed transport instead.
2016-03-11 14:46:44 -08:00
Eric Anderson eccd231131 Don't hold a lock in DelayedStream when calling realStream
Our current lock ordering rules prohibit holding a lock when calling the
channel and stream. This change avoids the lock for both
DelayedClientTransport and DelayedStream. It is effectively a rewrite of
DelayedStream.

The fixes to ClientCallImpl were to ensure sane state in DelayedStream.

Fixes #1510
2016-03-09 15:14:00 -08:00
Kun Zhang b9c12327eb Add log ID.
To ManagedChannelImpl, TransportSet and all client transport
implementations, so they can be correlated in the logs. Also added more
life-cycle logging in general.
2016-03-09 13:52:32 -08:00
Carl Mastrangelo 8ed0088eff Make Status code use percent encoding 2016-03-07 10:01:44 -08:00
Kun Zhang 2491402036 Remove or use unused variables. 2016-03-04 17:05:23 -08:00
Carl Mastrangelo 946611909e remove unused var 2016-03-04 16:17:31 -08:00
Kun Zhang 0e14516f5a Run createTransportRunnable outside of lock.
Because `scheduleConnection()` is run under lock, if we ran
`createTransportRunnable` inside `scheduleConnection()`,
`savedDelayedTransport.setTransport()` will be under lock which violates
the assumption made in https://github.com/grpc/grpc-java/issues/1408 that

> there is an implicit rule today that channel layer will not hold any lock while calling into transport

and had caused deadlock with `InProcessTransport`.

Also updated tests to

 1. Make it clear that we want the first obtained transport to be the
 real transport instead of the delayed transport, because
 `InProcessTransport` has deadlock issues with delayed
 transport (grpc/grpc-java/pull/1510)

 2. Not rely on identity equity to check whether `TransportSet` has
 switched to a different address. Instead, call `newStream()` and check
 which real transport is actually called, which is more reliable.

 3. Add timeout when checking for real transport creation and
 starting. Tests in general should not check for implementation detail,
 e.g., whether certain work is done synchronously.
2016-03-03 16:35:12 -08:00
William Thurston a574159c81 Add interceptForward methods for Client and Server 2016-03-03 15:32:54 -08:00
Carl Mastrangelo 0e370eb155 Remove static initializer blocks 2016-03-03 09:51:51 -08:00
Eric Anderson 1170afd168 Add transport test for Netty
Netty client shutdown would race with the negotiation handling and
circumvent AbstractBufferingHandler. Use a new command in order to
leave channel.close() available for abrupt killing of the connection
when connecting.

ping_afterTermination was previously racey that made it succeed. After
fixing the test, Netty would consistently fail to call callback. After
fixing Netty to fail the callback it was not using the right status
because when Netty's channel is closed none of our handlers are run.
This reliably fails the future with ClosedChannelException, which is
useless, so now we special-case that exception and fill in the reason
for shutdown.

To prevent accidentally reporting Status.OK, the transports no longer
use OK when calling transportShutdown. The OK status was already no
longer being consumed, since keying off whether transportReady was
called is more helpful.

This fixes #1330
2016-03-01 17:43:30 -08:00
Kun Zhang 643bb2c6b5 Always start from the first address after a successful connection. 2016-02-26 17:21:47 -08:00
Carl Mastrangelo 86bad4ffea Add more log into for cancellation 2016-02-26 13:37:14 -08:00
Louis Ryan 8dad73492a Various naming and documentation clenaups
Remove attachAsCloseable and replace with the immediate run / call methods
Introduce a concrete Deadline type and use it
2016-02-25 16:33:10 -08:00
Eric Anderson b17a249fc4 Create new AbstractTransportTest for Transports
This is lower-level than the existing AbstractTransportTest. It should
be used by all transports, but InProcessTransport is the only one as
part of this commit.
2016-02-25 16:23:17 -08:00
Kun Zhang d86dfc9552 Merge DelayedStream's setError() into cancel()
DelayedClientTransport.PendingStream will override cancel(), which has a
clearer semantic.

Also permitting all status codes except OK in ClientStream.cancel(),
instead of just 4 codes.
2016-02-25 11:28:48 -08:00
Eric Anderson 06e3ef5945 Fix bugs and improvements found by static analyser 2016-02-23 17:32:35 -08:00
Kun Zhang 7a29f3993c Pass transports instead of futures of transports for new calls.
This PR finishes the refactoring started by #1395. Resolves #1342.

Major changes:

- All interfaces that return `ListenableFuture<T>` now return `T`
- Stop passing `null` for transports after shut down. Pass
  `FailingClientTransport` instead. This simplifies the interface
  semantics of interfaces that return a transport, as well as their
  callers because they no longer need to check for `null`.
- Add two methods to `TransportManager`:
 - `createInterimTransport()` takes the place of `BlankFutureProvider`
  in `LoadBalancer` implementations.
 - `createFailingTransport()` takes the place of errors in the `Future`
  when `LoadBalancer` implementations propagate errors to the caller.
- `createInterimTransport()` creates a `DelayedClientTransport` tracked
  by `ManagedChannelImpl`, which will not terminate until all
  `DelayedClientTransport`s, in addition to the `TransportSet`s, are
  terminated.
- Removed the transport argument from the ready and shutdown callbacks,
  because if `LoadBalancer` was given a delayed transport earlier, it
  will get the real transport's shutdown event, thus won't be able to
  match the two through identity comparison, which beats the purpose of
  passing the transport.
2016-02-23 09:42:03 -08:00
Xiao Hang 52b3db2c06 Fix a bug ByteReadableBufferWrapper. We should set new buffer's limit before changing the original buffer's position 2016-02-22 16:28:36 -08:00
William Thurston 8d0267fc41 Allow for interceptors to send and receive messages of type InputStream. 2016-02-21 18:01:25 -08:00
Lukasz Strzalkowski af6a2650af Add simple BINARY_BYTE_MARSHALLER 2016-02-20 12:30:20 -08:00
Eric Anderson 6f1261f288 Decrease log verbosity for transport status changes
Most of the time it is just feeling like logspam.

Fixes #1439
2016-02-19 09:26:30 -08:00
Eric Anderson b752e76858 Automated readability/efficiency tweaks
Although the changes were determined automatically, they were manually
applied to the codebase.

ClientCalls actually has a bug fix, since the suggestion to add
interrupt() made it obvious that interrupted() was inappropriate.
2016-02-16 14:15:23 -08:00
Kun Zhang cf787bddf2 DelayedClientTransport and fix TransportSet.shutdown() semantics.
Always return a completed future from `TransportSet`. If a (real) transport has not been created (e.g., in reconnect back-off), a `DelayedClientTransport` will be returned.

Eventually we will get rid of the transport futures everywhere, and have streams always __owned__ by some transports.

DelayedClientTransport
----------------------

After we get rid of the transport future, this is what `ClientCallImpl` and `LoadBalancer` get when a real transport has not been created yet. It buffers new streams and pings until `setTransport()` is called, after which point all buffered and future streams/pings are transferred to the real transport.

If a buffered stream is cancelled, `DelayedClientTransport` will remove it from the buffer list, thus #1342 will be resolved after the larger refactoring is complete.

This PR only makes `TransportSet` use `DelayedClientTransport`. Follow-up changes will be made to allow `LoadBalancer.pickTransport()` to return null, in which case `ManagedChannelImpl` will give `ClientCallImpl` a `DelayedClientTransport`.

Changes to ClientTransport shutdown semantics
---------------------------------------------

Previously when shutdown() is called, `ClientTransport` should not accept newStream(), and when all existing streams have been closed, `ClientTransport` is terminated. Only when a transport is terminated would a transport owner (e.g., `TransportSet`) remove the reference to it.

`DelayedClientTransport` brings about a new case: when `setTransport()` is called, we switch to the real transport and no longer need the delayed transport. This is achieved by calling `shutdown()` on the delayed transport and letting it terminate. However, as the delayed transport has already been handed out to users, we would like `newStream()` to keep working for them, even though the delayed transport is already shut down and terminated.

In order to make it easy to manage the life-cycle of `DelayedClientTransport`, we redefine the shutdown semantics of transport:
- A transport can own a stream. Typically the transport owns the streams
  it creates, but there may be exceptions. `DelayedClientTransport` DOES
  NOT OWN the streams it returns from `newStream()` after `setTransport()`
  has been called. Instead, the ownership would be transferred to the
  real transport.
- After `shutdown()` has been called, the transport stops owning new
  streams, and `newStream()` may still succeed. With this idea,
  `DelayedClientTransport`, even when terminated, will continue
  passing `newStream()` to the real transport.
- When a transport is in shutdown state, and it doesn't own any stream,
  it then can enter terminated state.

ManagedClientTransport / ClientTransport
----------------------------------------

Remove life-cycle interfaces from `ClientTransport`, and put them in its subclass - `ManagedClientTransport`, with the same idea that we have `Channel` and `ManagedChannel`. Only the one who creates the transport will get `ManagedClientTransport` thus is able to start and shutdown the transport. The users of transport, e.g., `LoadBalancer`, can only get `ClientTransport` thus are not alter its state. This change clarifies the responsibility of transport life-cycle management.

Fix TransportSet shutdown semantics
-----------------------------------

Currently, if `TransportSet.shutdown()` has been called, it no longer create new transports, which is wrong.

The correct semantics of `TransportSet.shutdown()` should be:
- Shutdown all transports, thus stop new streams being created on them
- Stop `obtainActiveTransport()` from returning transports
- Streams that already created, including those buffered in delayed transport, should continue. That means if delayed transport has buffered streams, we should let the existing reconnect task continue.
2016-02-12 09:36:25 -08:00
Carl Mastrangelo 544cd3a33b pause 2016-02-11 15:45:30 -08:00
Eric Anderson ad301c7e4d Make thread-safety ownership of Metadata explicit 2016-02-11 12:40:38 -08:00
Lukasz Strzalkowski 48b30291ee Add Metadata#keys() which returns set of all keys in the store 2016-02-11 17:32:05 +01:00
Eric Anderson 964963ab1a Replace AUTHORITY_KEY with ClientStream.setAuthority 2016-02-10 17:26:51 -08:00
Eric Anderson 86f2c9f224 Fix InProcessTransport to call onReady
Fixes #875
2016-02-10 10:01:15 -08:00
Solomon Duskis f6aba497ae Fixing a typo in Http2ClientStream. 2016-02-03 09:58:32 -08:00
Eric Anderson e475d388b9 Cancel server context when call is cancelled
Context was being closed when the server was closing the RPC, but not if
the client cancelled.
2016-02-01 14:20:08 -08:00
Eric Anderson 6e94cf33db Require a ScheduledExecutorService to be provided to Context
Before the service would be leaked, because when the scheduled future
was cancelled the scheduler wouldn't be released. Also, Future isn't
powerful enough to signal when we should release when cancelling.

Given the nature of Context, it also seems beneficial to not have it own
threads. Since any caller of withDeadline*() is required to cancel the
Context, it shouldn't be too burdensome for them to manage the lifecycle
of the scheduler.
2016-02-01 14:16:11 -08:00
Eric Anderson 4a427b7ac9 Use instance equality for Context.Key
This allows applications to limit the visibility of values simply by not
exposing the Key instance being used.
2016-02-01 14:13:54 -08:00
Carl Mastrangelo a3c79e87ae Add a simple compression API 2016-02-01 12:56:21 -08:00
Eric Anderson 1488010cb1 Use generics for LoadBalancer to avoid ClientTransport exposure
TransportManager.makeTransport() was added to remove the only other
reference to ClientTransport outside of core and the transports.
2016-01-29 17:48:01 -08:00
Carl Mastrangelo 127e7c04a0 Fix executor propagation in CallOptions. 2016-01-29 15:25:24 -08:00
Kun Zhang ba54513f5c Fix a concurrent modification in BlankFutureProvider.
The Set from Collections.synchronizedSet() is not protected against
concurrent modification during iteration. We copy an ArrayList out of it
for iteration.
2016-01-28 11:27:04 -08:00
nmittler b7c4e18dcd Change status of HTTP/2 NO_ERROR to UNAVAILABLE.
Fixes #1355
2016-01-27 11:10:54 -08:00
Eric Anderson f59e04f310 Permit overriding Channel's executor per-call 2016-01-26 12:41:50 -08:00
Eric Anderson fe5e624153 Avoid cancel before start, which is not handled in transports
When triggered, it caused the ClientCall.Listener never to complete.
Fixes #1343

The new test doesn't actually fail on my machine with the old code, but
we would hope it would be flaky. Since a race is involved, I don't
expect a more reliable test.
2016-01-25 13:20:10 -08:00
Eric Anderson bcb5fcdf82 Propagate headers/trailers if response isn't gRPC
This provides more structured data into the application for it to do
special handling.

In general, we would hope most people don't need this functionality, but
it is a good escape hatch to allow users to workaround infrastructure
problems.
2016-01-13 18:27:16 -08:00
Carl Mastrangelo 5205d9cc43 Fix unsynchronized access in InProcessTransport 2016-01-12 13:16:51 -08:00