Make node removal conditional in processGraphChanges
This commit is contained in:
@@ -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())
|
klog.V(5).Infof("%v doesn't exist in the graph, this shouldn't happen", accessor.GetUID())
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeExistingNode := true
|
||||||
|
|
||||||
|
if removeExistingNode {
|
||||||
// removeNode updates the graph
|
// removeNode updates the graph
|
||||||
gb.removeNode(existingNode)
|
gb.removeNode(existingNode)
|
||||||
existingNode.dependentsLock.RLock()
|
existingNode.dependentsLock.RLock()
|
||||||
@@ -699,5 +703,6 @@ func (gb *GraphBuilder) processGraphChanges() bool {
|
|||||||
gb.attemptToDelete.Add(ownerNode)
|
gb.attemptToDelete.Add(ownerNode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user