pbacsko commented on a change in pull request #336:
URL: 
https://github.com/apache/incubator-yunikorn-k8shim/pull/336#discussion_r783005657



##########
File path: pkg/cache/task.go
##########
@@ -440,6 +460,23 @@ func (task *Task) beforeTaskAllocated(event *fsm.Event) {
 }
 
 func (task *Task) postTaskBound(event *fsm.Event) {
+       if task.pluginMode {
+               // when the pod is scheduling by yunikorn, it is moved to the 
default-scheduler's
+               // unschedulable queue, if nothing changes, the pod will be 
staying in the unschedulable
+               // queue for unschedulableQTimeInterval long (default 1 
minute). hence, we are updating
+               // the pod status explicitly, when there is a status change, 
the default scheduler will
+               // move the pod back to the active queue immediately.
+               podCopy := task.pod.DeepCopy()

Review comment:
       Can we reason about the performance effects of this copy? If we do this 
all the time (and that's what seems to be happening), we end up creating extra 
objects which affects GC time. Maybe not a big deal, just something to think 
about.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to