mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
scheduler: delete docs related to equivalence cache from scheduler (#105417)
* Delete: delete docs related to equivalence cache from scheduler * Fix: re-add comment about ServiceAffinity
This commit is contained in:
parent
9eaabb6b2e
commit
0bb4c14519
@ -108,11 +108,6 @@ func (sched *Scheduler) deleteNodeFromCache(obj interface{}) {
|
||||
return
|
||||
}
|
||||
klog.V(3).InfoS("Delete event for node", "node", klog.KObj(node))
|
||||
// NOTE: Updates must be written to scheduler cache before invalidating
|
||||
// equivalence cache, because we could snapshot equivalence cache after the
|
||||
// invalidation and then snapshot the cache itself. If the cache is
|
||||
// snapshotted before updates are written, we would update equivalence
|
||||
// cache with stale information which is based on snapshot of old cache.
|
||||
if err := sched.SchedulerCache.RemoveNode(node); err != nil {
|
||||
klog.ErrorS(err, "Scheduler cache RemoveNode failed")
|
||||
}
|
||||
@ -218,11 +213,6 @@ func (sched *Scheduler) updatePodInCache(oldObj, newObj interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
// NOTE: Updates must be written to scheduler cache before invalidating
|
||||
// equivalence cache, because we could snapshot equivalence cache after the
|
||||
// invalidation and then snapshot the cache itself. If the cache is
|
||||
// snapshotted before updates are written, we would update equivalence
|
||||
// cache with stale information which is based on snapshot of old cache.
|
||||
if err := sched.SchedulerCache.UpdatePod(oldPod, newPod); err != nil {
|
||||
klog.ErrorS(err, "Scheduler cache UpdatePod failed", "oldPod", klog.KObj(oldPod), "newPod", klog.KObj(newPod))
|
||||
}
|
||||
@ -247,11 +237,6 @@ func (sched *Scheduler) deletePodFromCache(obj interface{}) {
|
||||
return
|
||||
}
|
||||
klog.V(3).InfoS("Delete event for scheduled pod", "pod", klog.KObj(pod))
|
||||
// NOTE: Updates must be written to scheduler cache before invalidating
|
||||
// equivalence cache, because we could snapshot equivalence cache after the
|
||||
// invalidation and then snapshot the cache itself. If the cache is
|
||||
// snapshotted before updates are written, we would update equivalence
|
||||
// cache with stale information which is based on snapshot of old cache.
|
||||
if err := sched.SchedulerCache.RemovePod(pod); err != nil {
|
||||
klog.ErrorS(err, "Scheduler cache RemovePod failed", "pod", klog.KObj(pod))
|
||||
}
|
||||
@ -416,8 +401,6 @@ func addAllEventHandlers(
|
||||
}
|
||||
case framework.Service:
|
||||
// ServiceAffinity: affected by the selector of the service is updated.
|
||||
// Also, if new service is added, equivalence cache will also become invalid since
|
||||
// existing pods may be "captured" by this service and change this predicate result.
|
||||
informerFactory.Core().V1().Services().Informer().AddEventHandler(
|
||||
buildEvtResHandler(at, framework.Service, "Service"),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user