volcano
volcano copied to clipboard
"NewPodListerFromNode" May be leave CachePods Uninitialized
What would you like to be added:
NewPodListerFromNode and NewPodListerFromNode May be leave CachePods Uninitialized
Why is this needed:
- Applying
pl.copyTaskPod(task)to all tasks of all jobs incurs excessive costs, yet not all tasks will be successfully scheduled. - The
UpdateTaskfunction should only be called when tasks are successfully scheduled. - In the event that task.UID is not found in
pl.CachedPods, theUpdateTaskfunction will invokecopyTaskPodand save toCachePods.
Therefore, if we leave CachePods uninitialized when PodListor is initialized, pl.UpdateTask will function normally and behave like "Copy On Write," and the schedule failed task will not trigger any action.
We should also confirm that there are no other calls if we leave CachePods Uninitialized, or they will get an empty task and pod list.