diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-12-16 09:14:05 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-12-16 09:14:05 -0800 |
| commit | 1bf22c0b5b1ecd99cb1631800e5a6818e8d8d1b1 (patch) | |
| tree | eaa221a960e59b1b73b6b76035787a603dd1892c /weed/shell/command_volume_server_evacuate.go | |
| parent | 1d88865869b554d72be8fe2629080bcd97cb8767 (diff) | |
| download | seaweedfs-1bf22c0b5b1ecd99cb1631800e5a6818e8d8d1b1.tar.xz seaweedfs-1bf22c0b5b1ecd99cb1631800e5a6818e8d8d1b1.zip | |
go fmt
Diffstat (limited to 'weed/shell/command_volume_server_evacuate.go')
| -rw-r--r-- | weed/shell/command_volume_server_evacuate.go | 2 |
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 59303ec55..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(capacityByMaxVolumeCount) + otherNodes[i].localVolumeRatio(capacityByMaxSsdVolumeCount) < otherNodes[j].localVolumeRatio(capacityByMaxVolumeCount) + otherNodes[j].localVolumeRatio(capacityByMaxSsdVolumeCount) + return otherNodes[i].localVolumeRatio(capacityByMaxVolumeCount)+otherNodes[i].localVolumeRatio(capacityByMaxSsdVolumeCount) < otherNodes[j].localVolumeRatio(capacityByMaxVolumeCount)+otherNodes[j].localVolumeRatio(capacityByMaxSsdVolumeCount) }) for i := 0; i < len(otherNodes); i++ { |
