Commit Graph

1587 Commits

Author SHA1 Message Date
Jihun Cho 3e9f3964c4 Start 1.29.0 development cycle 2020-02-26 09:37:27 -08:00
Jihun Cho 659987185f
core: revert stickiness from round robin (#6698) 2020-02-11 10:58:32 -08:00
ZHANG Dapeng 66f08c71b1
core,xds: clean up xds config parsing from service config util 2020-01-31 11:31:48 -08:00
Chengyuan Zhang c0f37e59ab
core, grpclb: change policy selection strategy for Grpclb policy (take one: eliminate special logic for deciding grpclb policy in core) (#6637)
First take for grpclb selection stabilization: 

1. Changed DnsNameResolver to return balancer addresses as a GrpcAttributes.ATTR_LB_ADDRS attribute in ResolutionResult, instead of among the addresses.

2. AutoConfiguredLoadBalancerFactory decides LB policy solely based on parsed service config without looking at resolved addresses. Behavior changes:
  - If no LB policy is specified in service config, default to pick_first, even if there exist balancer addresses (in attributes).
  - If grpclb specified but not available and no other specified policies available, it will fail without fallback to round_robin.

3. GrpclbLoadBalancer populates balancer addresses from ResolvedAddresses's attribute (GrpclbConstants.ATTR_LB_ADDRS) instead of sieving from addresses.
2020-01-31 10:41:43 -08:00
ZHANG Dapeng 1ed538f253
all: log picker when updating balancing state
Let `ManagedChannelImpl` log picker update when updating balancing state.
2020-01-28 09:55:04 -08:00
Jihun Cho 85eb92418c
core: fix ATTR_LOAD_BALANCING_CONFIG has service config instead of raw lb config (#6648) 2020-01-27 14:36:53 -08:00
Jihun Cho 751faa6faa
core: promote ServiceConfigErrorHandling (#6633) 2020-01-23 17:59:27 -08:00
Jihun Cho b1209b7ed5
core: fix AutoConfiguredLBFactory populates wrong type (#6600) 2020-01-22 16:52:43 -08:00
Eric Gribkoff 42f2e7f733
core: change catch blocks for Android <19 (#6611)
Caught by lint warning during import
2020-01-21 14:38:10 -08:00
Eric Anderson ca56aa30d4 Start 1.28.0 development cycle 2020-01-14 15:10:05 -08:00
ZHANG Dapeng 066e72dc5d
core/util: Go to TRANSIENT_FAILURE on initial resolution error for GracefulSwitchLoadBalancer (#6598)
Go to TRANSIENT_FAILURE immediately instead of NOOP if GracefulSwitchLoadBalancer receives resolution error before switching to any delegate.

In most natural usecase, the `gracefulSwitchLb` is a child balancer of some `parentLb`, and the `gracefulSwitchLb` switches to a new `delegateLb` when `parentLb.handleResolvedAddressGroup()`. If the  `parentLb` receives a resolution error before receiving any resolved addresses, it should go to  TRANSIENT_FAILURE. In this case, it will be more convenient if the initial  `gracefulSwitchLb` can go to TRANSIENT_FAILURE directly.
2020-01-14 09:54:48 -08:00
Chengyuan Zhang b7ccc0d142
core, census, testing, interop-testing, android-interop-testing: move census dependency out of grpc-core (#6577)
Decouples grpc-core with census, while still preserve the default integration of census in grpc-core. Users wishing to enable census needs to add grpc-census to their runtime classpath.

- Created a grpc-census module:
    - Moved CensusStatsModule.java and CensusTracingModule.java into grpc-census from grpc-core. CensusModuleTests.java is also moved. They now belong to io.grpc.census package.
Moved DeprecatedCensusConstants.java into io.grpc.census.internal (is this necessary?) in grpc-census.
    - Created CensusStatsAccessor.java and CensusTracingAccessor.java, which are used to create census ClientInterceptor and ServerStreamTracer.Factory.
    - Everything in grpc-census are package private, except the accessor classes. They only publicly expose ClientInterceptor and ServerStreamTracer.Factory, no Census specific types are exposed.

- Use runtime reflection to load and apply census stats/tracing to channel/server builders, if grpc-census is found in runtime classpath.

- Removed special APIs on AbstractManagedChannelImplBuilder and AbstractServerImplBuilder for overriding census module. They are only used for testing. Now we changed tests to apply Census ClientInterceptor and ServerStreamTracer.Factory just as normal interceptor/stream tracer factory. Test writer is responsible for taking care of the ordering concerns of interceptors and stream tracer factories.
2020-01-13 14:35:29 -08:00
Tomo Suzuki 75f6fd8f10 Upgrade error_prone_annotations to 2.3.4 2020-01-03 14:50:34 -08:00
Eric Anderson bcda439317 core: Simplify ServiceConfigUtil via utility methods
This should be functionally equivalent. More can be done, but wanted all the
changes to be "obvious" when reading them.
2020-01-02 11:17:21 -08:00
Graeme Morgan d3c77f2d87 all: Add suppressions for GuardedBy violations
This supports releasing a new version of GuardedBy which finds more mistakes than it used to.

Filed #6578 to try to clean up the suppressions.
2019-12-30 10:17:05 -08:00
ZhenLian 19805233ef netty: Add Executor When Creating SslContext
This PR is to add one more Executor parameter when creating the SslContext.
In Netty, we already have this implementation for passing Executor when creating SslContext: netty/netty#8847. This extra Executor is used to take some time-consuming tasks when doing SSL handshake. However, in current gRPC implementation, we are not using this API.

In this PR, the relevant changes are:

1. get the executorPool from ChannelBuilder or ServerBuilder

2. pass the executorPool all the way down to ClientTlsHandler

3. fill executorPool in when creating SslHandler
2019-12-30 08:33:16 -08:00
Jihun Cho 90969b3471
core: make service config error handling optional implementation (#6564) 2019-12-26 15:07:20 -08:00
Ran f6544bf95c
core: delay sending cancel request on client-side when deadline expires (#6328) 2019-12-16 09:58:36 -08:00
Eric Anderson 9485003cf9 core: Release Channel resources before considering terminated 2019-12-10 16:23:38 -08:00
ZHANG Dapeng d5eb61c968
xds: drop support for balancer_name in XdsConfig
The balancer_name field in XdsConfig is deprecated and from now on we ignore it and don't support it.
2019-12-10 13:59:10 -08:00
ZHANG Dapeng 718f0369cb
core: refactor GracefulSwitchLoadBalancer to switch based on LoadBalancer.Factory
`GracefulSwitchLoadBalancer` was doing switch based on `LoadBalancerProvider.getPolicyName()`. This turned out to be very awkward when I have to synthesize a policy name for the provider, and what I actually care about is the identity of the lb provider not necessarily the policy name.

Now `GracefulSwitchLoadBalancer` is doing switch based on identity of `LoadBalancer.Factory`, which is simpler.
2019-12-09 11:57:16 -08:00
Tomo Suzuki 29638780ae build: Replaced outdated comments (#6492) 2019-12-05 13:53:51 -08:00
Eric Gribkoff bfa085a1cf
Start 1.27.0 development cycle (#6480) 2019-12-03 17:27:55 -08:00
ZHANG Dapeng 8062406afc
interop-testing,core: interop test to get remote address attributes
Adding interop-test for getting remote server address from client interceptor. Also added this feature to inprocess transport.
2019-12-02 13:30:55 -08:00
Chengyuan Zhang eb21c646b2
api, core: make scheduled executor service accessible for NameResolver.Args (#6455)
Added new API on NameResolver.Args to access ScheduledExecutorService, which is wrapped transport executor.
2019-11-21 16:14:13 -08:00
Jihun Cho eaf99cf7fe
core,xds: add missing JUnit RunWith annotation (#6457) 2019-11-21 11:52:34 -08:00
Chengyuan Zhang c7a6f62831
xds: add gRPC-Java build version into Node parsed for xDS protocol (#6443) 2019-11-19 14:14:18 -08:00
ZHANG Dapeng 2d454d478c
Revert "Revert "all: remove deprecated usePlaintext(boolean)""
This reverts commit 316a739e67.
2019-11-18 16:53:52 -08:00
Chengyuan Zhang 86bfefdaf2
api, core: make channel logger accessible through NameResolver.Args (#6430) 2019-11-18 16:33:39 -08:00
Yongwoo Noh add020fd19 core: fix typo in javadoc (#6431) 2019-11-15 11:19:28 -08:00
Ran b80a07a1ca
core: delay attaching cancellation listener to context on server-side. (#6333) 2019-11-14 14:29:34 -08:00
ZHANG Dapeng b38d3ee571
all: remove unnecessary SuppressWarnings 2019-11-06 15:20:04 -08:00
Carl Mastrangelo 40bcab5d12 core: use seconds in deadline exceeded string (#6341) 2019-11-05 13:59:20 -08:00
Eric Anderson 4dba65bad4 api: Rename blockingExecutor to offloadExecutor
The API review for #6279 came up with a more meaningful name that
better explains the intent. A setter for the old name was left in
ManagedChannelBuilder to ease migration to the new name by current
users.
2019-11-04 13:16:08 -08:00
Jihun Cho cd4b4b0fc5 core: remove unused dep, fix broken javadoc link 2019-10-31 10:43:42 -07:00
Kun Zhang 47d798bbec
Start 1.26.0 development cycle (#6329) 2019-10-23 15:27:22 -07:00
Jihun Cho ae11b9facc
api,core,stub: fix lint errors (#6305) 2019-10-18 17:30:00 -07:00
Chengyuan Zhang 9dce879742
xds: add fields for EDS server and LRS server in XdsConfig (#6287) 2019-10-18 13:33:56 -07:00
Jihun Cho eef47b26b8
core,grpclb: DnsNameResolver will use srv record by default if grpclb (#6298) 2019-10-18 13:00:47 -07:00
Grant Oakley adcfb3e623 api,core: Adds an Executor field to NameResolver.Args.
Adds an Executor to NameResolver.Args, which is optionally set on ManagedChannelBuilder. This allows NameResolver implementations to avoid creating their own thread pools if the application already manages its own pools.

Addresses #3703.
2019-10-14 08:46:26 -07:00
ZHANG Dapeng 316a739e67
Revert "all: remove deprecated usePlaintext(boolean)"
This reverts commit 296857b4e7.
2019-10-10 15:56:47 -07:00
Jihun Cho 2c3ef874d8
core: fix typo in AutoConfiguredLoadBalancerFactory (#6262) 2019-10-10 12:34:45 -07:00
ZHANG Dapeng 296857b4e7
all: remove deprecated usePlaintext(boolean) 2019-10-08 09:27:39 -07:00
Eric Anderson e9921b77f2 Create ConscryptLoader for code sharing 2019-10-07 11:37:50 -07:00
Eric Anderson ad159cea96 Remove vestigial SuppressWarnings("LiteralClassName")
Error Prone 2.1.2 removed the warning.
2019-09-30 14:02:46 -07:00
Chengyuan Zhang 18a9671ea0
core: move check Json object methods to JsonUtil (#6214) 2019-09-27 14:29:26 -07:00
Chengyuan Zhang d3e86da6b6
core: move generic Json util methods out of ServiceConfigUtil (#6211) 2019-09-27 11:45:38 -07:00
Eric Anderson 2b945774b6 Apply animalsniffer plugin explicitly when needed 2019-09-13 09:42:17 -07:00
Eric Anderson 4215b80b81 Apply java plugin explicitly when needed 2019-09-13 09:42:17 -07:00
Eric Anderson e13221b503 Apply japicmp plugin explicitly when needed 2019-09-13 09:42:17 -07:00