Skip to content

Commit

Permalink
balancer/leastrequest: Add verbosity check around build log (#7467)
Browse files Browse the repository at this point in the history
  • Loading branch information
zasweq authored Aug 1, 2024
1 parent 887d908 commit 4a26a49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion balancer/leastrequest/leastrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ type scWithRPCCount struct {
}

func (lrb *leastRequestBalancer) Build(info base.PickerBuildInfo) balancer.Picker {
logger.Infof("least-request: Build called with info: %v", info)
if logger.V(2) {
logger.Infof("least-request: Build called with info: %v", info)
}
if len(info.ReadySCs) == 0 {
return base.NewErrPicker(balancer.ErrNoSubConnAvailable)
}
Expand Down

0 comments on commit 4a26a49

Please sign in to comment.