Skip to content

Commit

Permalink
Merge pull request #3858 from bogo-y/usemin
Browse files Browse the repository at this point in the history
vc-scheduler: simplify code for drf-plugin
  • Loading branch information
volcano-sh-bot authored Dec 10, 2024
2 parents 1d9b36f + d2cdc4c commit 087d990
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/scheduler/plugins/drf/drf.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,7 @@ func (drf *drfPlugin) compareQueues(root *hierarchicalNode, lqueue *api.QueueInf
lpaths := strings.Split(lqueue.Hierarchy, "/")
rnode := root
rpaths := strings.Split(rqueue.Hierarchy, "/")
depth := 0
if len(lpaths) < len(rpaths) {
depth = len(lpaths)
} else {
depth = len(rpaths)
}
for i := 0; i < depth; i++ {
for i, depth := 0, min(len(lpaths), len(rpaths)); i < depth; i++ {
// Saturated nodes have minumun prioirty,
// so that demanding nodes will be poped first.
if !lnode.saturated && rnode.saturated {
Expand Down

0 comments on commit 087d990

Please sign in to comment.