Skip to content

Commit

Permalink
actually use the builder rand not the global one
Browse files Browse the repository at this point in the history
  • Loading branch information
demmer committed Apr 12, 2024
1 parent ff32f97 commit 9e7124f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/vt/vtgateproxy/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (b *JSONGateResolverBuilder) update(r *JSONGateResolver) {
head := 0
tail := n - 1
for i := 0; i < n-1; i++ {
j := head + rand.Intn(tail-head+1)
j := head + b.rand.Intn(tail-head+1)

if r.affinity == "" || r.affinity == targets[j].affinity {
targets[head], targets[j] = targets[j], targets[head]
Expand Down

0 comments on commit 9e7124f

Please sign in to comment.