mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix same dc and other dc
This commit is contained in:
parent
a0ef6e3611
commit
3d87aa767d
|
@ -73,9 +73,9 @@ func (vc *vidMap) LookupVolumeServerUrl(vid string) (serverUrls []string, err er
|
|||
var sameDcServers, otherDcServers []string
|
||||
for _, loc := range locations {
|
||||
if vc.DataCenter == "" || loc.DataCenter == "" || vc.DataCenter != loc.DataCenter {
|
||||
sameDcServers = append(sameDcServers, loc.Url)
|
||||
} else {
|
||||
otherDcServers = append(otherDcServers, loc.Url)
|
||||
} else {
|
||||
sameDcServers = append(sameDcServers, loc.Url)
|
||||
}
|
||||
}
|
||||
rand.Shuffle(len(sameDcServers), func(i, j int) {
|
||||
|
|
Loading…
Reference in a new issue