-
Notifications
You must be signed in to change notification settings - Fork 963
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
The allocate phase only updates the podgroup in the pending state to the inqueue state #2658
The allocate phase only updates the podgroup in the pending state to the inqueue state #2658
Conversation
…dates the podgroup in the pending state to the inqueue state Signed-off-by: wangyang <[email protected]>
@@ -61,7 +61,7 @@ func (alloc *Action) Execute(ssn *framework.Session) { | |||
|
|||
for _, job := range ssn.Jobs { | |||
// If not config enqueue action, change Pending pg into Inqueue statue to avoid blocking job scheduling. | |||
if !conf.EnabledActionMap["enqueue"] { | |||
if !conf.EnabledActionMap["enqueue"] && job.IsPending() { |
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.
It's LGTM generally. Some kind suggestions are as follows:
- If this patch is in use, suggest to refactor the
else
section like this:else if job.IsPending()
, which may be more readable and clean. - IMO, a more reasonable way is to filter podgroups which are not at
completed
status at the stage of snapshot. If that, only podgroups, which are to be allocated resources, will enter the session. Besides, it will improve the performance.
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.
Thanks for your suggestion, the first question has been optimized.
There are still some doubts about the second question. The function implemented here is to prevent the job in the pending state from blocking when the enqueue action is not configured, so the processing logic for updating the pending job to the inqueue state is added.
However, before the update, the status of the job was not judged, but all status jobs were updated to inqueue (including running
, unknown
, and completed
). This kind of processing did not meet the original intention, and also caused the problem recorded in the issue.
I understand that by correcting this, the problem in the issue should be solved first. For the filtering of the job in the completed state, can it not be processed for the time being?
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 got you. Before reviewing this PR, I've looked through the related issue. If available, can you help for the filter in the later PR?
/retest |
…te phase Signed-off-by: wangyang <[email protected]>
6b66e9d
to
8b37ea2
Compare
/approve |
[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 |
Signed-off-by: wangyang [email protected]
fix: #2657