Skip to content
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

fix the reclaim bugs: push back the queue to queues in reclaim #3004

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/scheduler/actions/reclaim/reclaim.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (ra *Action) Execute(ssn *framework.Session) {
job = jobs.Pop().(*api.JobInfo)
}

Copy link
Member

@wangyang0616 wangyang0616 Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding and fixing this problem, is it possible to add queues.Push(queue) here, and then delete queues.Push(queue) on line 200?

There is similar processing in allocate.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will change the order of the code.

queues.Push(queue)
// Found "high" priority task to reclaim others
if tasks, found := preemptorTasks[job.UID]; !found || tasks.Empty() {
continue
Expand Down Expand Up @@ -212,7 +213,6 @@ func (ra *Action) Execute(ssn *framework.Session) {
if assigned {
jobs.Push(job)
}
queues.Push(queue)
}
}

Expand Down
Loading