aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_server_evacuate.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-02-09 11:38:42 -0800
committerChris Lu <chris.lu@gmail.com>2021-02-09 11:38:42 -0800
commit2bf5ea87d6788fc1b82d36ffaed42ce0345b955e (patch)
treeb83fdc9ec478696ff43ebdf05f556ac6cd4e5724 /weed/shell/command_volume_server_evacuate.go
parentd221a937df38ff587e2392a313681b0a0f48138b (diff)
parent821c46edf10097200b986bd17dc01d3991cf57ff (diff)
downloadseaweedfs-2bf5ea87d6788fc1b82d36ffaed42ce0345b955e.tar.xz
seaweedfs-2bf5ea87d6788fc1b82d36ffaed42ce0345b955e.zip
Merge branch 'support_ssd_volume'
Diffstat (limited to 'weed/shell/command_volume_server_evacuate.go')
-rw-r--r--weed/shell/command_volume_server_evacuate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/shell/command_volume_server_evacuate.go b/weed/shell/command_volume_server_evacuate.go
index a82454cd3..1539ccb19 100644
--- a/weed/shell/command_volume_server_evacuate.go
+++ b/weed/shell/command_volume_server_evacuate.go
@@ -175,7 +175,7 @@ func moveAwayOneEcVolume(commandEnv *CommandEnv, ecShardInfo *master_pb.VolumeEc
func moveAwayOneNormalVolume(commandEnv *CommandEnv, volumeReplicas map[uint32][]*VolumeReplica, vol *master_pb.VolumeInformationMessage, thisNode *Node, otherNodes []*Node, applyChange bool) (hasMoved bool, err error) {
sort.Slice(otherNodes, func(i, j int) bool {
- return otherNodes[i].localVolumeRatio() < otherNodes[j].localVolumeRatio()
+ return otherNodes[i].localVolumeRatio(capacityByMaxVolumeCount)+otherNodes[i].localVolumeRatio(capacityByMaxSsdVolumeCount) < otherNodes[j].localVolumeRatio(capacityByMaxVolumeCount)+otherNodes[j].localVolumeRatio(capacityByMaxSsdVolumeCount)
})
for i := 0; i < len(otherNodes); i++ {