Use the correctly typed `rand.Int*` variant
This commit is contained in:
parent
3a1dc9a194
commit
1aefdb1e15
|
@ -348,7 +348,7 @@ func (b *EvalBroker) scanForSchedulers(schedulers []string) (*structs.Evaluation
|
|||
default:
|
||||
// Multiple tasks. We pick a random task so that we fairly
|
||||
// distribute work.
|
||||
offset := rand.Int63n(n)
|
||||
offset := rand.Intn(n)
|
||||
return b.dequeueForSched(eligibleSched[offset])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@ func (s *Server) forwardRegion(region, method string, args interface{}, reply in
|
|||
}
|
||||
|
||||
// Select a random addr
|
||||
offset := rand.Int31n(len(servers))
|
||||
offset := rand.Intn(len(servers))
|
||||
server := servers[offset]
|
||||
s.peerLock.RUnlock()
|
||||
|
||||
|
|
Loading…
Reference in New Issue