pbacsko commented on a change in pull request #336:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/336#discussion_r783059490
##########
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:
Is this delete necessary? Under what circumstances can we have an entry?
As I can see it, `inProgressAllocations` is populated from
`StartPodAllocation()` but that already requires that pending has an entry
which we just add in line 139. Am I missing something here?
Is it a bug if we already have something in `inProgressAllocations` at this
point for the same `podKey`?
--
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]