link.metadata deletions can leave the graph metadata with old values until the next kytos.topology.updated event is published. I ended up hitting this when analyzing and trying to reproduce issue #53, it turns out that self.graph.update_link_metadata(link) is only setting the values, since it was originally meant to be used right after the graph got cleared, which always happens when processing a kytos.topology.updated, but with kytos/topology.links.metadata.(added|removed), when a metadata gets removed it'll send the remaining (current) metadata, and it'll leave behind metadata keys in the graph edges until a next kytos.topology.updated is received to update the graph from scratch again.
Here's an example of deleting "bandwidth" link metadata, but on graph edge it's still there:
To keep it simpler to maintain, including minimize potential race conditions and locks, then it'd be more appropriate to only keep kytos.topology.updated, and then whenever a link metadata changes on topology it also sends a kytos.topology.updated since a link metadata is meaningful, since it can represent a logical metric that's relevant to pathfinder, we can still publishing kytos/topology.links.metadata.(added|removed) on topology to avoid breaking compatibility though.
Another benefit of using only using kytos.topology.updated on pathfinder is that we don't also need the reconciliation topology event in the first place, so it can also contribute to fix other underlying problems that were inherent from having this responsibility split over multiple handlers. So, it can indirectly fix issue #53.
link.metadata deletions can leave the graph metadata with old values until the next
kytos.topology.updated
event is published. I ended up hitting this when analyzing and trying to reproduce issue #53, it turns out thatself.graph.update_link_metadata(link)
is only setting the values, since it was originally meant to be used right after the graph got cleared, which always happens when processing akytos.topology.updated
, but withkytos/topology.links.metadata.(added|removed)
, when a metadata gets removed it'll send the remaining (current) metadata, and it'll leave behind metadata keys in the graph edges until a nextkytos.topology.updated
is received to update the graph from scratch again.Here's an example of deleting
"bandwidth"
link metadata, but on graph edge it's still there:To keep it simpler to maintain, including minimize potential race conditions and locks, then it'd be more appropriate to only keep
kytos.topology.updated
, and then whenever a link metadata changes on topology it also sends akytos.topology.updated
since a link metadata is meaningful, since it can represent a logical metric that's relevant topathfinder
, we can still publishingkytos/topology.links.metadata.(added|removed)
ontopology
to avoid breaking compatibility though.Another benefit of using only using
kytos.topology.updated
onpathfinder
is that we don't also need the reconciliation topology event in the first place, so it can also contribute to fix other underlying problems that were inherent from having this responsibility split over multiple handlers. So, it can indirectly fix issue #53.