Skip to content

Commit

Permalink
balancer: reduce chattiness (#1608)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fho authored and menghanl committed Oct 25, 2017
1 parent c5f391b commit 33ee217
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions balancer_conn_wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ func (ccb *ccBalancerWrapper) handleResolvedAddrs(addrs []resolver.Address, err
}

func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) {
grpclog.Infof("ccBalancerWrapper: new subconn: %v", addrs)
ac, err := ccb.cc.newAddrConn(addrs)
if err != nil {
return nil, err
Expand All @@ -197,7 +196,6 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer
}

func (ccb *ccBalancerWrapper) RemoveSubConn(sc balancer.SubConn) {
grpclog.Infof("ccBalancerWrapper: removing subconn")
acbw, ok := sc.(*acBalancerWrapper)
if !ok {
return
Expand All @@ -207,7 +205,6 @@ func (ccb *ccBalancerWrapper) RemoveSubConn(sc balancer.SubConn) {
}

func (ccb *ccBalancerWrapper) UpdateBalancerState(s connectivity.State, p balancer.Picker) {
grpclog.Infof("ccBalancerWrapper: updating state and picker called by balancer: %v, %p", s, p)
ccb.cc.csMgr.updateState(s)
ccb.cc.blockingpicker.updatePicker(p)
}
Expand All @@ -224,7 +221,6 @@ type acBalancerWrapper struct {
}

func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) {
grpclog.Infof("acBalancerWrapper: UpdateAddresses called with %v", addrs)
acbw.mu.Lock()
defer acbw.mu.Unlock()
if !acbw.ac.tryUpdateAddrs(addrs) {
Expand Down
2 changes: 0 additions & 2 deletions balancer_v1_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ type balancerWrapper struct {
// connections accordingly.
func (bw *balancerWrapper) lbWatcher() {
<-bw.startCh
grpclog.Infof("balancerWrapper: is pickfirst: %v\n", bw.pickfirst)
notifyCh := bw.balancer.Notify()
if notifyCh == nil {
// There's no resolver in the balancer. Connect directly.
Expand Down Expand Up @@ -230,7 +229,6 @@ func (bw *balancerWrapper) lbWatcher() {
}

func (bw *balancerWrapper) HandleSubConnStateChange(sc balancer.SubConn, s connectivity.State) {
grpclog.Infof("balancerWrapper: handle subconn state change: %p, %v", sc, s)
bw.mu.Lock()
defer bw.mu.Unlock()
scSt, ok := bw.connSt[sc]
Expand Down

0 comments on commit 33ee217

Please sign in to comment.