ec balance among nodes with HDD

This commit is contained in:
Chris Lu 2021-02-16 06:22:50 -08:00
parent 3097b9a9b7
commit ad70107eb4

View file

@ -326,7 +326,9 @@ func balanceEcShardsWithinRacks(commandEnv *CommandEnv, allEcNodes []*EcNode, ra
var possibleDestinationEcNodes []*EcNode var possibleDestinationEcNodes []*EcNode
for _, n := range racks[RackId(rackId)].ecNodes { for _, n := range racks[RackId(rackId)].ecNodes {
possibleDestinationEcNodes = append(possibleDestinationEcNodes, n) if _, found := n.info.DiskInfos[string(types.HardDriveType)]; found {
possibleDestinationEcNodes = append(possibleDestinationEcNodes, n)
}
} }
sourceEcNodes := rackEcNodesWithVid[rackId] sourceEcNodes := rackEcNodesWithVid[rackId]
averageShardsPerEcNode := ceilDivide(rackToShardCount[rackId], len(possibleDestinationEcNodes)) averageShardsPerEcNode := ceilDivide(rackToShardCount[rackId], len(possibleDestinationEcNodes))