Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jscheinblum authored and brirams committed Mar 8, 2024
1 parent 7e292fa commit d2e999a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/vt/vtgateproxy/gate_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (p *slackAZAffinityPicker) Pick(info balancer.PickInfo) (balancer.PickResul
ptr := val.(*uint32)
atomic.AddUint32(ptr, 1)

if len(subConns) >= numConnections {
if len(subConns) >= numConnections && numConnections > 0 {
fmt.Printf("Limiting to first %v\n", numConnections)
return p.pickFromSubconns(subConns[0:numConnections], *ptr)
} else {
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgateproxy/vtgateproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (proxy *VTGateProxy) getConnection(ctx context.Context, target string) (*vt
proxy.numConnections = targetURL.Query().Get("num_connections")
proxy.gateType = targetURL.Host

fmt.Printf("Getting connection for %v in %v\n", target, proxy.azID)
fmt.Printf("Getting connection for %v in %v with %v connections\n", target, proxy.azID, proxy.numConnections)

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (26)

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / End-to-End Test

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vreplication_migrate_vdiff2_convert_tz)

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (vtbackup_transform)

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / test

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Unit Test (Race)

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Run Upgrade Downgrade Test - Backups - Manual

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / cluster initial sharding multi

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / cluster initial sharding multi

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / cluster initial sharding multi

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 10

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 10

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 10

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 25

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 25

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 25

undefined: fmt

Check failure on line 72 in go/vt/vtgateproxy/vtgateproxy.go

View workflow job for this annotation

GitHub Actions / Docker Test Cluster 25

undefined: fmt

// If the connection exists, return it
proxy.mu.Lock()
Expand Down

0 comments on commit d2e999a

Please sign in to comment.