Skip to content

Commit

Permalink
internal: add log when service config is disabled (#4973)
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Nov 12, 2021
1 parent 6e79bc8 commit cf8b64e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,10 @@ func (cc *ClientConn) updateResolverState(s resolver.State, err error) error {
}

var ret error
if cc.dopts.disableServiceConfig || s.ServiceConfig == nil {
if cc.dopts.disableServiceConfig {
channelz.Infof(logger, cc.channelzID, "ignoring service config from resolver (%v) and applying the default because service config is disabled", s.ServiceConfig)
cc.maybeApplyDefaultServiceConfig(s.Addresses)
} else if s.ServiceConfig == nil {
cc.maybeApplyDefaultServiceConfig(s.Addresses)
// TODO: do we need to apply a failing LB policy if there is no
// default, per the error handling design?
Expand Down

0 comments on commit cf8b64e

Please sign in to comment.