You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/01/12 11:43:19 UTC
[GitHub] [incubator-yunikorn-k8shim] pbacsko commented on a change in pull request #336: [YUNIKORN-971] Implement YuniKorn as a Kubernetes scheduler plugin.
pbacsko commented on a change in pull request #336:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/336#discussion_r782996743
##########
File path: pkg/cache/external/scheduler_cache.go
##########
@@ -36,23 +36,23 @@ import (
// nodes are cached in the form of de-scheduler nodeInfo, instead of re-creating all nodes info from scratch,
// we replicate nodes info from de-scheduler, in order to re-use predicates functions.
type SchedulerCache struct {
- // node name to NodeInfo map
- nodesMap map[string]*framework.NodeInfo
- podsMap map[string]*v1.Pod
- // this is a map of assumed pods,
- // the value indicates if a pod volumes are all bound
- assumedPods map[string]bool
- lock sync.RWMutex
- // client APIs
- clients *client.Clients
+ nodesMap map[string]*framework.NodeInfo // node name to NodeInfo map
+ podsMap map[string]*v1.Pod
+ assumedPods map[string]bool // map of assumed pods, value indicates if pod volumes are all bound
+ pendingAllocations map[string]string // map of pod to node ID, presence indicates a pending allocation for scheduler
+ inProgressAllocations map[string]string // map of pod to node ID, presence indicates an in-process allocation for scheduler
Review comment:
We need some extra comment which explains what is the difference between a "pending" and an "in progress" allocation. Just by looking at the code, it's not straightforward which comes first and what is the lifecycle of the pods.
--
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: reviews-unsubscribe@yunikorn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org