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



##########
File path: pkg/cache/external/scheduler_cache.go
##########
@@ -132,6 +132,45 @@ func (cache *SchedulerCache) removeNode(node *v1.Node) 
error {
        return nil
 }
 
+func (cache *SchedulerCache) AddPendingPodAllocation(podKey string, nodeID 
string) {
+       cache.lock.Lock()
+       defer cache.lock.Unlock()
+       delete(cache.inProgressAllocations, podKey)

Review comment:
       If a pod fails to bind in the default scheduler for some reason, the 
only notice we may get (as there is not a callback in the scheduler framework 
for failed binds) is another call to PreFilter() / Filter() for this pod. So it 
is possible in that case for us to have an in-progress allocation. So, we 
remove it and reset the state back to pending to be safe.
   
   




-- 
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