We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fe55d80 + 6d279ed commit 8b1acc3Copy full SHA for 8b1acc3
policies.go
@@ -904,10 +904,14 @@ func (d *dcAwareRR) Pick(q ExecutableQuery) NextHost {
904
// a different rack, before hosts in all other datercentres
905
906
type rackAwareRR struct {
907
+ // lastUsedHostIdx keeps the index of the last used host.
908
+ // It is accessed atomically and needs to be aligned to 64 bits, so we
909
+ // keep it first in the struct. Do not move it or add new struct members
910
+ // before it.
911
+ lastUsedHostIdx uint64
912
localDC string
913
localRack string
914
hosts []cowHostList
- lastUsedHostIdx uint64
915
}
916
917
func RackAwareRoundRobinPolicy(localDC string, localRack string) HostSelectionPolicy {
0 commit comments