Commit Graph

39 Commits

Author SHA1 Message Date
Easwar Swaminathan 0066bf69de
grpc: perform graceful switching of LB policies in the `ClientConn` by default (#5285) 2022-04-01 13:14:35 -07:00
Easwar Swaminathan 7840bd63de
grpc: add a comment explaining why updateClientConnState is handled inline (#5261) 2022-03-21 14:51:11 -07:00
Easwar Swaminathan c4cabf78f4
grpc: handle invalid service configs by applying the default if available (#5238) 2022-03-16 12:02:56 -07:00
Easwar Swaminathan a73725f42d
channelz: include channelz identifier in logs (#5192) 2022-02-23 07:30:06 -08:00
Doug Fawley 8ab16ef276
balancer: add ExitIdle optional interface (#4673) 2021-08-18 15:04:35 -07:00
Doug Fawley 997ce619eb
clientconn: do not automatically reconnect addrConns; go idle instead (#4613) 2021-08-10 13:22:34 -07:00
Menghan Li 0956b12520
client: handle RemoveSubConn in goroutine to avoid deadlock (#4504) 2021-06-02 21:22:13 -07:00
Doug Fawley b1f7648a9f
client: ensure LB policy is closed before closing resolver (#4478) 2021-05-21 15:15:58 -07:00
Menghan Li cb396472c2
Revert "grpc: call balancer.Close() before returning from ccBalancerWrapper.close()" (#4391)
This reverts commit 28078834f3.
2021-05-06 13:28:27 -07:00
Easwar Swaminathan 28078834f3
grpc: call balancer.Close() before returning from ccBalancerWrapper.close() (#4364) 2021-04-29 21:44:26 -07:00
Menghan Li 7276af6dd7
client: fix leaked addrConn struct when addresses are updated (#4347) 2021-04-22 10:45:24 -07:00
Easwar Swaminathan 9dfe677337
balancer: Add UpdateAddresses() to balancer.ClientConn interface (#4215) 2021-02-25 15:48:39 -08:00
Garrett Gutierrez 506b773066
Implemented component logging (#3617) 2020-06-26 12:04:47 -07:00
Doug Fawley 4eb418e5b2
balancer: move Balancer and Picker to V2; delete legacy API (#3431) 2020-04-28 14:52:49 -07:00
Garrett Gutierrez fff75ae40f
channelz: log on channelz trace events and trace on channelz relevant logs. (#3329)
channelz: log on channelz trace events and trace on channelz relevant logs. (#3329)
2020-02-14 10:11:26 -08:00
Doug Fawley c35a580b0c
Revert "balancer: move Balancer and Picker to V2; delete legacy… (#3315)
This reverts commit 336cf8d761.
2020-01-13 13:12:55 -08:00
Doug Fawley 336cf8d761
balancer: move Balancer and Picker to V2; delete legacy API (#3301) 2020-01-10 13:44:48 -08:00
Doug Fawley dc49de8acd
balancer: add V2Picker, ClientConn.UpdateState, SubConnState.ConnectionError (#3186)
Also implement V2 versions of base.*, xds, pickfirst, grpclb, and round robin balancers.
2019-11-21 10:27:29 -08:00
Doug Fawley 2cb07fcd90
resolver: rename Option to Options, leaving type aliases for now (#3175) 2019-11-12 15:23:46 -08:00
Easwar Swaminathan 583401aac5
Add a general purpose unbounded buffer implementation (#3099)
This PR moves the unbounded buffer implementation found in
`scStateUpdateBuffer` to the internal package. It also makes the buffer
work with `interface{}` type.

This addresses a TODO in the existing code. This will also help with the
eventual `BalancerManager` implementation which will supersede the
`ccBalancerWrapper` implementation found in balancer_conn_wrappers.go.
2019-11-04 14:22:16 -08:00
Doug Fawley ed563a02ea
resolver: add State fields to support error handling (#2951) 2019-10-04 12:59:43 -07:00
Menghan Li f7de2c8d62
balancer: filter out grpclb addresses if balancer is not grpclb (#2907) 2019-07-17 15:08:56 -07:00
Doug Fawley d40a995895
balancer/resolver: add loadBalancingConfig and pre-parsing support (#2732) 2019-05-30 09:12:58 -07:00
Menghan Li 0435a4bb26
balancer: stop using picker from old balancer with switching balancers (#2833) 2019-05-29 10:35:14 -07:00
Doug Fawley 3910b873d3
bar: add ability to update resolver state atomically and pass directly to the balancer (#2693) 2019-03-22 10:48:55 -07:00
Menghan Li 191cc8e37b
grpclb: filter out grpclb addresses if balancer in use is not grpclb (#2509) 2018-12-13 10:54:42 -08:00
Doug Fawley 8f2842d4f0
client: in UpdateBalancerState, update picker before connectivity state (#2431)
In very rare cases, we could start an RPC before the picker had been updated to
one that would return a valid SubConn.  This is not a problem as the new picker
will be called again as soon as it is updated, but it can lead to test flakes
that depend upon the picker not being called before being ready.
2018-11-02 10:27:41 -07:00
Menghan Li 4dedfdc82c
credentials: support google default creds (#2315)
Google default creds is a combo of ALTS, TLS and OAuth2. The right set of creds will be picked to use based on environment.

This PR contains:
 - A new `creds.Bundle` type
   - changes to use it in ClientConn and transport
   - dial option to set the bundle for a ClientConn
   - balancer options and NewSubConnOption to set it for SubConn
 - Google default creds implementation by @cesarghali 
 - grpclb changes to use different creds mode for different servers
 - interop client changes for google default creds testing
2018-09-25 13:17:25 -07:00
Karsten Weiss 7de9139327 Fix typos (#1994) 2018-04-16 10:03:02 -07:00
Menghan Li 0547980095
Notify parent ClientConn to re-resolve in grpclb (#1699)
The parent ClientConn should re-resolve when grpclb loses connection to the
remote balancer.

When the ClientConn inside grpclb gets a TransientFailure, it calls
lbManualResolver.ResolveNow(), which calls parent ClientConn's ResolveNow, and
eventually results in re-resolve happening in parent ClientConn's resolver (DNS
for example).

This PR adds a method to balancer.ClientConn interface, so balancer can tell
parent ClientConn to re-resolve.
2017-12-18 15:36:55 -08:00
Menghan Li 1fc873d0f6
Disable ccBalancerWrapper when it is closed (#1698) 2017-12-06 10:49:20 -08:00
Brandon Gao a62701e4aa Eliminate data race in ccBalancerWrapper (#1688) 2017-11-28 14:41:43 -08:00
Menghan Li 10873b30bf
Fix panics on balancer and resolver updates (#1684)
- NewAddress with empty list (addrConn with an empty address list)
 - NewServiceConfig to switch balancer before the first balancer is built
2017-11-22 13:59:20 -08:00
Menghan Li 87bcb38fba
Eliminate race on ac.acbw (#1666)
Guard ac.acbw with mutex
2017-11-13 13:43:31 -08:00
Fabian Holler 33ee217d11 balancer: reduce chattiness (#1608)
Remove some log messages from balancer_conn_wrappers and
balancer_v1_wrapper which seem to be indented for debugging (one of them
was even logging a pointer address).

They can produce a lot of log messages which don't add value in a normal
scenario.
2017-10-25 11:01:53 -07:00
Menghan Li b3ed81a60b Fix connectivity state transitions when dialing (#1596) 2017-10-23 14:06:33 -07:00
Menghan Li a353537ff5 Register and use default balancers and resolvers (#1551) 2017-10-19 11:32:06 -07:00
Menghan Li 4bbdf230d7 New implementation of roundrobin and pickfirst (#1506) 2017-10-02 09:22:57 -07:00
Menghan Li 8233e124e4 Add new Resolver and Balancer APIs (gRFC L9) (#1408)
- Add package balancer and resolver.
 - Change ClientConn internals to new APIs and adds a wrapper for v1 balancer.
2017-08-31 10:59:09 -07:00