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

The status of a pod group is updated only when the pod group changes. #3081

Merged
merged 1 commit into from
Aug 28, 2023
Merged
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
6 changes: 0 additions & 6 deletions pkg/scheduler/framework/job_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import (

const (
jobUpdaterWorker = 16

jobConditionUpdateTime = time.Minute
jobConditionUpdateTimeJitter = 30 * time.Second
)

// TimeJitterAfter means: new after old + duration + jitter
Expand Down Expand Up @@ -61,9 +58,6 @@ func isPodGroupConditionsUpdated(newCondition, oldCondition []scheduling.PodGrou

newTime := newCond.LastTransitionTime
oldTime := oldCond.LastTransitionTime
if TimeJitterAfter(newTime.Time, oldTime.Time, jobConditionUpdateTime, jobConditionUpdateTimeJitter) {
Copy link
Member

Choose a reason for hiding this comment

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

What's the backgroud of update podgroup in a period of time?

Copy link
Member Author

@wangyang0616 wangyang0616 Aug 28, 2023

Choose a reason for hiding this comment

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

This item is added to reduce the number of access times of the API server. However, this item does not take effect. The initial hope is that the condition is inconsistent and the timing exceeds one minute. Update the apiserver.

I have verified that the pod group status does not change when the pod group is in the running state. When the pod group is in the pending or inqueue state, the pod group status does not change frequently. Therefore, I think the 1-minute interval can be deleted.

return true
}

// if newCond is not new enough, we treat it the same as the old one
newCond.LastTransitionTime = oldTime
Expand Down
Loading