Browse Source

fix when a volume server has only hdd volumes

pull/1794/head
Chris Lu 4 years ago
parent
commit
b7fef8f693
  1. 3
      weed/shell/command_volume_balance.go

3
weed/shell/command_volume_balance.go

@ -270,6 +270,9 @@ func balanceSelectedVolume(commandEnv *CommandEnv, volumeReplicas map[uint32][]*
for i := 0; i < len(nodes)-1; i++ { for i := 0; i < len(nodes)-1; i++ {
emptyNode := nodes[i] emptyNode := nodes[i]
if capacityFunc(emptyNode.info) == 0 {
continue
}
if !(fullNode.localVolumeRatio(capacityFunc) > idealVolumeRatio && emptyNode.localVolumeNextRatio(capacityFunc) <= idealVolumeRatio) { if !(fullNode.localVolumeRatio(capacityFunc) > idealVolumeRatio && emptyNode.localVolumeNextRatio(capacityFunc) <= idealVolumeRatio) {
// no more volume servers with empty slots // no more volume servers with empty slots
break break

Loading…
Cancel
Save