mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
Merge pull request #110925 from kapiljain1989/remove_scheduler_cache_ttl
Remove TTL for scheduler cache to resolve the race condition when Cac…
This commit is contained in:
commit
47ad357c52
2
pkg/scheduler/internal/cache/cache.go
vendored
2
pkg/scheduler/internal/cache/cache.go
vendored
@ -750,7 +750,7 @@ func (cache *cacheImpl) cleanupAssumedPods(now time.Time) {
|
|||||||
"pod", klog.KObj(ps.pod))
|
"pod", klog.KObj(ps.pod))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if now.After(*ps.deadline) {
|
if cache.ttl != 0 && now.After(*ps.deadline) {
|
||||||
klog.InfoS("Pod expired", "pod", klog.KObj(ps.pod))
|
klog.InfoS("Pod expired", "pod", klog.KObj(ps.pod))
|
||||||
if err := cache.removePod(ps.pod); err != nil {
|
if err := cache.removePod(ps.pod); err != nil {
|
||||||
klog.ErrorS(err, "ExpirePod failed", "pod", klog.KObj(ps.pod))
|
klog.ErrorS(err, "ExpirePod failed", "pod", klog.KObj(ps.pod))
|
||||||
|
@ -53,7 +53,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
// Duration the scheduler will wait before expiring an assumed pod.
|
// Duration the scheduler will wait before expiring an assumed pod.
|
||||||
// See issue #106361 for more details about this parameter and its value.
|
// See issue #106361 for more details about this parameter and its value.
|
||||||
durationToExpireAssumedPod = 15 * time.Minute
|
durationToExpireAssumedPod = 0 * time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrNoNodesAvailable is used to describe the error that no nodes available to schedule pods.
|
// ErrNoNodesAvailable is used to describe the error that no nodes available to schedule pods.
|
||||||
|
Loading…
Reference in New Issue
Block a user