Skip to content

Commit

Permalink
fix slice init
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxuzhonghu committed Jun 10, 2020
1 parent e073227 commit 5e4402c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scheduler/plugins/nodeorder/nodeorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (pp *nodeOrderPlugin) OnSessionOpen(ssn *framework.Session) {
batchNodeOrderFn := func(task *api.TaskInfo, nodeInfo []*api.NodeInfo) (map[string]float64, error) {
// InterPodAffinity
state := k8sframework.NewCycleState()
nodes := make([]*v1.Node, len(nodeInfo))
nodes := make([]*v1.Node, 0, len(nodeInfo))
for _, node := range nodeInfo {
nodes = append(nodes, node.Node)
}
Expand Down

0 comments on commit 5e4402c

Please sign in to comment.