Commit Graph

10 Commits

Author SHA1 Message Date
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
Ning Xie 5bc9b325fa fix lbpb package name typo (#3290) 2020-01-02 12:10:08 -08:00
Doug Fawley 085c980048
grpclb: do not send redundant empty load reports to remote LB (#3249)
Small refactor of tests:

- Add a channel to remoteBalancer on which to send received stats messages
- Change runAndGetStats to runAndCheckStats to allow for faster successful test
  runs (no longer need to sleep for one whole second per test).
- Remove redundant leak check from runAndCheckStats, otherwise excess load
  report messages not read from the channel will result in an infinite loop.
- Add String method to rpcStats to avoid data race between merging and printing.
2019-12-12 14:10:47 -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
Menghan Li 69e99ca520
grpclb: keep drop index unless a new serverlist is received (#2631)
Keep the drop index from the previous picker when regenerating picker due to
subchannel state change. Only reset the drop index when picker is regenerated
because of a serverlist update.

fixes #2623
2019-03-11 10:09:16 -07:00
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
Menghan Li aa30531d2b
grpclb: remove redundent testing struct (#2126)
Remove `rpcStatsForTest` and reuse `rpcStats` in tests.

Also fix races: https://travis-ci.org/grpc/grpc-go/jobs/388477002
2018-06-12 11:29:05 -07:00
Carl Mastrangelo dc86fffc26
Normalize gRPC LB 2018-06-11 17:52:20 -07:00
Carl Mastrangelo 4344c204c9 Split grpclb out of top level grpc package (#2107)
This PR splits out grpclb from grpc.  I have made the PR in several commits so you can see more clearly the steps that happened.

There are a few possibly contentious points that I would like to make clear up front:

* grpclb will no longer autoload as a load balancer.  I think this is okay, as service config is not widely (at all?) used, and I believe this is the only way to access it.
* `internal` is used more, as a way of having code shared between packages without exposing types
* ConnectivityStateEvaluator, as used by grpclb, is no longer thread safe.  I believe there is an outer mutex that guards access, but I want to point out this subtle change up here.

All but one tests pass with this, due to another cyclic dependency.  I can fix this, but it is a little more widely scoped (such as exposing grpc.server and grpc.errorDesc in the internal package).   This PR is a nearly-passing sample of that last step to get this working. 

PTAL @menghanl @dfawley
2018-06-05 09:54:12 -07:00