Skip to content

Commit

Permalink
normalize the names
Browse files Browse the repository at this point in the history
  • Loading branch information
demmer committed May 21, 2024
1 parent 94197b5 commit 23393aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go/vt/vtgateproxy/firstready_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type frPickerBuilder struct {
}

func (f *frPickerBuilder) Build(info base.PickerBuildInfo) balancer.Picker {
log.V(100).Infof("firstreadyPicker: Build called with info: %v", info)
log.V(100).Infof("first_ready: Build called with info: %v", info)

if len(info.ReadySCs) == 0 {
return base.NewErrPicker(balancer.ErrNoSubConnAvailable)
Expand All @@ -69,18 +69,18 @@ func (f *frPickerBuilder) Build(info base.PickerBuildInfo) balancer.Picker {
// If we've already chosen a subconn, and it is still in the ready list, then
// no need to change state
if f.currentConn != nil {
log.V(100).Infof("firstreadyPicker: currentConn is active, checking if still ready")
log.V(100).Infof("first_ready: currentConn is active, checking if still ready")
for sc := range info.ReadySCs {
if f.currentConn == sc {
log.V(100).Infof("firstreadyPicker: currentConn still active - not changing")
log.V(100).Infof("first_ready: currentConn still active - not changing")
return f
}
}
}

// Otherwise either we don't have an active conn or the conn we were using is
// no longer active, so pick an arbitrary new one out of the map.
log.V(100).Infof("firstreadyPicker: currentConn is not active, picking a new one")
log.V(100).Infof("first_ready: currentConn is not active, picking a new one")
for sc := range info.ReadySCs {
f.currentConn = sc
break
Expand Down

0 comments on commit 23393aa

Please sign in to comment.