@@ -31,7 +31,6 @@ import (
3131 "time"
3232
3333 "github.com/eapache/go-resiliency/retrier"
34- "github.com/gogo/protobuf/proto"
3534 "github.com/hashicorp/go-multierror"
3635 qmutils "github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/quotaplugins/util"
3736
@@ -71,7 +70,6 @@ import (
7170 "github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/controller/queuejobdispatch"
7271
7372 clusterstateapi "github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/controller/clusterstate/api"
74- clusterstatecache "github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/controller/clusterstate/cache"
7573)
7674
7775// XController the AppWrapper Controller type
@@ -110,7 +108,7 @@ type XController struct {
110108
111109 //TODO: Do we need this local cache?
112110 // our own local cache, used for computing total amount of resources
113- cache clusterstatecache.Cache
111+ // cache clusterstatecache.Cache
114112
115113 // is dispatcher or deployer?
116114 isDispatcher bool
@@ -207,8 +205,8 @@ func NewJobController(config *rest.Config, serverOption *options.ServerOption) *
207205 initQueue : cache .NewFIFO (GetQueueJobKey ),
208206 updateQueue : cache .NewFIFO (GetQueueJobKey ),
209207 qjqueue : NewSchedulingQueue (),
210- //TODO: do we still need cache to be initialized?
211- cache : clusterstatecache .New (config ),
208+ //cache is turned-off, issue: https://github.com/project-codeflare/multi-cluster-app-dispatcher/issues/588
209+ // cache: clusterstatecache.New(config),
212210 schedulingAW : nil ,
213211 }
214212 //TODO: work on enabling metrics adapter for correct MCAD mode
@@ -1157,12 +1155,12 @@ func (qjm *XController) ScheduleNext(qj *arbv1.AppWrapper) {
11571155 // Assume preemption will remove low priroity AWs in the system, optimistically dispatch such AWs
11581156
11591157 if aggqj .LessEqual (resources ) {
1160- //TODO: should we turn -off histograms?
1161- unallocatedHistogramMap := qjm .cache .GetUnallocatedHistograms ()
1162- if ! qjm .nodeChecks (unallocatedHistogramMap , qj ) {
1163- klog .Infof ("[ScheduleNext] [Agent Mode] Optimistic dispatch for AW '%s/%s' requesting aggregated resources %v histogram for point in-time fragmented resources are available in the cluster %s" ,
1164- qj .Name , qj .Namespace , qjm .GetAggregatedResources (qj ), proto .MarshalTextString (unallocatedHistogramMap ["gpu" ]))
1165- }
1158+ //cache is turned -off, refer issue: https://github.com/project-codeflare/multi-cluster-app-dispatcher/issues/588
1159+ // unallocatedHistogramMap := qjm.cache.GetUnallocatedHistograms()
1160+ // if !qjm.nodeChecks(unallocatedHistogramMap, qj) {
1161+ // klog.Infof("[ScheduleNext] [Agent Mode] Optimistic dispatch for AW '%s/%s' requesting aggregated resources %v histogram for point in-time fragmented resources are available in the cluster %s",
1162+ // qj.Name, qj.Namespace, qjm.GetAggregatedResources(qj), proto.MarshalTextString(unallocatedHistogramMap["gpu"]))
1163+ // }
11661164 // Now evaluate quota
11671165 fits := true
11681166 klog .Infof ("[ScheduleNext] [Agent Mode] available resourse successful check for '%s/%s' at %s activeQ=%t Unsched=%t &qj=%p Version=%s Status=%+v." ,
@@ -1464,7 +1462,7 @@ func (cc *XController) Run(stopCh <-chan struct{}) {
14641462
14651463 cache .WaitForCacheSync (stopCh , cc .appWrapperSynced )
14661464
1467- //TODO: do we still need to run cache every second?
1465+ //cache is turned off, issue: https://github.com/project-codeflare/multi-cluster-app-dispatcher/issues/588
14681466 // update snapshot of ClientStateCache every second
14691467 //cc.cache.Run(stopCh)
14701468
0 commit comments