Make node removal conditional in processGraphChanges

This commit is contained in:
Jordan Liggitt 2020-07-08 01:54:03 -04:00
parent ac8d419b4c
commit b8d7ecf73b

View File

@ -679,6 +679,10 @@ func (gb *GraphBuilder) processGraphChanges() bool {
klog.V(5).Infof("%v doesn't exist in the graph, this shouldn't happen", accessor.GetUID())
return true
}
removeExistingNode := true
if removeExistingNode {
// removeNode updates the graph
gb.removeNode(existingNode)
existingNode.dependentsLock.RLock()
@ -699,5 +703,6 @@ func (gb *GraphBuilder) processGraphChanges() bool {
gb.attemptToDelete.Add(ownerNode)
}
}
}
return true
}