Commit Graph

1102 Commits

Author SHA1 Message Date
Carl Mastrangelo 2f2881756f
core: remove lint warning 2018-02-14 13:10:55 -08:00
Eric Anderson 3480a08e70 core: ConnectivityStateManager is always enabled
There have been no callers of disable() since commit 1c7421be7.
2018-02-13 08:56:43 -08:00
zpencer 890da706bb
Revert "core: tests for forwarding {Server,Client}{Call, CallListener} (#4058)" (#4070)
This reverts commit 77397b9dd0.
2018-02-12 12:21:24 -08:00
Eric Gribkoff 6ee6eae5a0
core: add prepareToLoseNetwork() method to ManagedChannel 2018-02-09 11:05:09 -08:00
zpencer 77397b9dd0
core: tests for forwarding {Server,Client}{Call, CallListener} (#4058) 2018-02-09 10:56:39 -08:00
zpencer 5d5e8c6ad5
core: Install the ServerInterceptor from BinaryLogProvider (#3879) 2018-02-09 10:56:04 -08:00
zpencer 011c7629fd
core: split binlog tests into two in ManagedChannelImplTest (#4049) 2018-02-09 10:52:07 -08:00
zpencer 35f0d15291
core: add subchannel stats (#3967) 2018-02-09 10:50:11 -08:00
zpencer d2c7e33f3e
core: pull out reusable forwarding test, refactoring forwarding tests (#3480) 2018-02-08 16:31:23 -08:00
ZHANG Dapeng bc3e4e9a85
core: Remove incorrect `@GuardedBy` annotations
This change is being made in preparation for fixing a bug in the enforcement
of `@guardedby`.

Non-static inner classes can refer to locks declared by their enclosing
instances. Static member types (static classes, interfaces) cannot.
2018-02-08 14:29:59 -08:00
zpencer f8c7f963ef
core,netty,okhttp: use ServiceProviders for ManagedChannelProvider, ServerProvider (#4047) 2018-02-08 08:57:52 -08:00
ZHANG Dapeng c735bb3385
core: retry part 6, client options - maxAttempts 2018-02-07 18:00:56 -08:00
ZHANG Dapeng e33d39cf93
core: retry part 6, client options - disable retry 2018-02-07 18:00:36 -08:00
ZHANG Dapeng ad62cc2775
core: retry part 5 continued, logic on retry policy
Implement logic for making retry decision using RetryPolicy.
2018-02-07 18:00:04 -08:00
Eric Gribkoff de54a4cb49
core: remove @Internal annotation on @Internal and @ExperimentalApi 2018-02-07 14:40:25 -08:00
Ryan Michela 48fb9ff55f core: Add toString() for MethodDescriptor and ServiceDescriptor (#4013) 2018-02-07 10:30:54 -08:00
zpencer 71cc0e37a8
core: remove unused test resouce files from NameResolverProviderTest (#4048) 2018-02-06 17:37:42 -08:00
zpencer ca40d55e00
core: extract provider class out of ServiceProvidersTest (#4042) 2018-02-05 15:17:57 -08:00
Snow Pettersen 2c8bc71fb7 core: Resolve address of GRPC_PROXY_EXP hostname
Since this address is never resolved gRPC fails to connect with an
UnresolvedAddressException when the env variable is specified. This
should resolve the address before we attempt to proxy to it.
2018-02-01 15:08:42 -08:00
ZHANG Dapeng dc95465f6a
core: retry part 5, add RetryPolicy data object 2018-01-31 11:25:50 -08:00
zpencer 141a1d23ee
core: install the binary logging client interceptor (#3937) 2018-01-31 09:33:12 -08:00
Eric Gribkoff 2f05c23063
Start 1.11.0 development cycle 2018-01-30 15:13:55 -08:00
Eric Anderson d792a72ea1 Revert "core: make ManagedChannel honor Service config LB "
This reverts commit 98aa69af72.

The GSON dependency is noticable on Android for no benefit (currently).
Reverting until we figure out what we want to do.
2018-01-30 13:38:45 -08:00
Eric Anderson fbdc217b46 Revert "core: handle long dns txt records properly, parse service config, and add tests"
This reverts commit b01609572a.

The GSON dependency is noticable on Android for no benefit (currently).
Reverting until we figure out what we want to do.
2018-01-30 13:38:45 -08:00
zpencer 47019325db
core: PartialForwardingServerCall should forward getAuthority (#4009) 2018-01-29 14:02:21 -08:00
zpencer a85b0e1047
core: remove spy() usage in ServerImplTest (#4010) 2018-01-29 14:02:00 -08:00
Kun Zhang df65bef881
core: delete outboundMessage() and inboundMessage() on StreamTracer. (#4014)
They were deprecated in 1.7.0.
2018-01-29 13:42:14 -08:00
zpencer 0465bb5aeb
core,testing: deprecate passing ServerCall to StatsTraceContext (#3912)
Instead, pass a ServerCallInfo object containing the interesting bits
of info. This lets us modify the call handler for binary logging, but
still provide the original info to the StatsTraceContext API.
2018-01-26 16:51:45 -08:00
Bogdan Drutu af936919f3 Update opencensus to 0.11.0 and remove extra dependencies. 2018-01-26 13:04:26 -08:00
Shohei Kamimori 0c21032221 core: change retention policies to CLASS
`@Internal` and `@ExperimentalApi` annotations are not visible at compile time
of application (not grpc-java) because their retention policies are `SOURCE`.
So, change retention policies to `CLASS`.
2018-01-26 13:01:55 -08:00
zpencer 199a5203c5
core: move ChannelStats and TransportStats to io.grpc.internal.Channelz (#4008) 2018-01-25 23:24:49 -08:00
zpencer b109595ad3
core: move Instrumented, LogId, WithLogId to io.grpc.internal as public (#3995) 2018-01-25 17:19:00 -08:00
zpencer 2a93e6b92f
core: NameResolverProvider should use ServiceProviders util (#4005) 2018-01-25 17:18:42 -08:00
zpencer 2996207c20
core: generifiy ServiceProvider class (#3886)
Moving all the common code among different service provider
classes to one place.
2018-01-25 14:12:09 -08:00
zpencer 36670c1fcd
core: disable jndi in gae jdk7 (#4000) 2018-01-25 11:32:19 -08:00
ZHANG Dapeng cd3c9e245b
core: retry part 4, retry attempt header 2018-01-23 17:28:52 -08:00
ZHANG Dapeng 671834fd9e
core: retry part 3: use call executor and sceduled executor service
Use call executor and scheduled executor service to schedule and run `retry()`.

Backoff amount computation from retry policy and testcases during backoff will be added in future PRs.
2018-01-23 10:56:19 -08:00
ZHANG Dapeng cf4a38ed45
core: retry part 2, buffer size limit
Implement buffer size counting with ClientStreamTracer and buffer size limit following the spce https://github.com/grpc/proposal/blob/master/A6-client-retries.md#memory-management-buffering
2018-01-23 10:35:59 -08:00
Carl Mastrangelo b01609572a
core: handle long dns txt records properly, parse service config, and add tests 2018-01-22 16:16:52 -08:00
Eric Anderson a54ff9cb54 core: Remove unused ServiceConfiguration
It was going to be used, but then the design changed. It's now
unnecessary.
2018-01-18 10:56:52 -08:00
zpencer c51b9271fb
core: rename io.grpc.internal.ChannelTracer to CallTracer (#3973)
This class will be reused to count ServerCall stats.
2018-01-17 14:04:09 -08:00
ZHANG Dapeng 358ea0c15d
core: retry part I followup, refactor commit()
It's more reasonable and convenient to return a `Runnable` for `commit()` method because we want to execute part of the commit under a lock and run part of it out of the lock.
2018-01-17 09:12:56 -08:00
Eric Anderson efcbef58e3 core: add missing separator in user-agent
The separator was accidentally removed in 1bbe126b4
2018-01-17 08:17:36 -08:00
zpencer 32ad2311ad
core: channel tracer should report target name and ConnectivityState (#3969)
This addresses regular channels and oob channels.
2018-01-16 10:05:30 -08:00
Carl Mastrangelo 98aa69af72
core: make ManagedChannel honor Service config LB
I think the idle state transitions are correct. I have looked at them and tried tracing a few paths through. This doesn't go full idle because the name resolver doesn't need to be restarted. Also, the LB transition happens inside of a NR callback, so it would be odd to have the NR terminate itself upon successful resolution. (Might this cause recursion? I think it may).
2018-01-12 16:56:54 -08:00
Eric Anderson bd7080337b core: Mention limitations of connectivity state API
These limitations are by design, but may be non-obvious.
2018-01-12 12:21:50 -08:00
Eric Anderson ba8063e7b0 all: Prefer mock+delegatesTo() over Mockito.spy()
Spies are really magical and easily produce unexpected results. Using them in
tests can easily yield tests that don't do what you think they do. Delegation
is much safer when possible.

Delegation doesn't work when methods `return true`, final methods, and with
restricted visibility, though. So CensusModulesTest and
MaxConnectionIdleManagerTest are left as-is.
2018-01-11 09:32:54 -08:00
Eric Anderson af0283477d Update ErrorProne to 2.2.0 and fix failures 2018-01-10 14:14:27 -08:00
zpencer 16cec947c5
core: MethodDescriptor.toBuilder() should copy schemaDescriptor (#3941) 2018-01-10 13:15:25 -08:00
Eric Anderson 4bc0c95d0b Update ErrorProne to 2.1.3 and fix failures
The fixes could have subtle side-effects, but I did take care when making them.
2018-01-09 12:40:55 -08:00