File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
pkg/scheduler/internal/cache Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -261,12 +261,12 @@ func (cache *schedulerCache) UpdateNodeInfoSnapshot(nodeSnapshot *nodeinfosnapsh
261
261
cache .updateNodeInfoSnapshotList (nodeSnapshot , updateAllLists )
262
262
}
263
263
264
- if len (nodeSnapshot .NodeInfoList ) != len ( nodeSnapshot . NodeInfoMap ) {
265
- errMsg := fmt .Sprintf ("snapshot state is not consistent, length of NodeInfoList=%v not equal to length of NodeInfoMap =%v " +
266
- "length of nodes in cache =%v, length of nodes in tree =%v" +
264
+ if len (nodeSnapshot .NodeInfoList ) != cache . nodeTree . numNodes {
265
+ errMsg := fmt .Sprintf ("snapshot state is not consistent, length of NodeInfoList=%v not equal to length of nodes in tree =%v " +
266
+ ", length of NodeInfoMap =%v, length of nodes in cache =%v" +
267
267
", trying to recover" ,
268
- len (nodeSnapshot .NodeInfoList ), len ( nodeSnapshot . NodeInfoMap ) ,
269
- len (cache . nodes ), cache .nodeTree . numNodes )
268
+ len (nodeSnapshot .NodeInfoList ), cache . nodeTree . numNodes ,
269
+ len (nodeSnapshot . NodeInfoMap ), len ( cache .nodes ) )
270
270
klog .Error (errMsg )
271
271
// We will try to recover by re-creating the lists for the next scheduling cycle, but still return an
272
272
// error to surface the problem, the error will likely cause a failure to the current scheduling cycle.
You can’t perform that action at this time.
0 commit comments