New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip early when reclaimees is empty #2732
Skip early when reclaimees is empty #2732
Conversation
@@ -152,6 +152,11 @@ func (ra *Action) Execute(ssn *framework.Session) { | |||
reclaimees = append(reclaimees, task.Clone()) | |||
} | |||
} | |||
|
|||
if len(reclaimees) == 0 { | |||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your modification very much. Is it better to add a line of debug logs before continue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just like
volcano/pkg/scheduler/actions/reclaim/reclaim.go
Lines 157 to 159 in 12a44e3
if err := util.ValidateVictims(task, n, victims); err != nil { | |
klog.V(3).Infof("No validated victims on Node <%s>: %v", n.Name, err) | |
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: Binbin Zou <binbin.zou@kyligence.io> add debug log Signed-off-by: Binbin Zou <binbin.zou@kyligence.io>
1f34948
to
6d361c1
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Thor-wl The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
@zbbkeepgoing: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When reclaimees is empty, it's no need execute ssn.Reclaimable(task, reclaimees).