diff --git a/vitrage/entity_graph/processor/processor.py b/vitrage/entity_graph/processor/processor.py index 3733944de..9dd31f492 100644 --- a/vitrage/entity_graph/processor/processor.py +++ b/vitrage/entity_graph/processor/processor.py @@ -219,12 +219,17 @@ class Processor(processor.ProcessorBase): for (vertex, edge) in neighbors: graph_vertex = self.entity_graph.get_vertex(vertex.vertex_id) if not graph_vertex or not PUtils.is_deleted(graph_vertex): - LOG.debug("Updates vertex: %s", vertex) - self._calculate_vitrage_aggregated_values(vertex, action) - PUtils.update_entity_graph_vertex(self.entity_graph, - graph_vertex, - vertex) - + if graph_vertex and not PUtils.is_newer_vertex(graph_vertex, + vertex): + LOG.warning("Neighbor update event arrived later than " + "expected - graph_vertex: %s --- " + "updated_vertex: %s", graph_vertex, vertex) + else: + LOG.debug("Updates vertex: %s", vertex) + self._calculate_vitrage_aggregated_values(vertex, action) + PUtils.update_entity_graph_vertex(self.entity_graph, + graph_vertex, + vertex) if edge not in valid_edges: LOG.debug("Updates edge: %s", edge) self.entity_graph.update_edge(edge) diff --git a/vitrage/tests/functional/evaluator/test_action_executor.py b/vitrage/tests/functional/evaluator/test_action_executor.py index e17f91bf3..30d3fdb9d 100644 --- a/vitrage/tests/functional/evaluator/test_action_executor.py +++ b/vitrage/tests/functional/evaluator/test_action_executor.py @@ -354,7 +354,7 @@ class TestActionExecutor(TestFunctionalBase, TestConfiguration): NProps.STATUS_INFO: 'test test test', DSProp.DATASOURCE_ACTION: DatasourceAction.SNAPSHOT, DSProp.ENTITY_TYPE: NAGIOS_DATASOURCE, - DSProp.SAMPLE_DATE: '2016-02-07 15:26:04'} + DSProp.SAMPLE_DATE: '2016-02-07T15:26:04Z'} @staticmethod def _get_vitrage_add_vertex_event(target_vertex, alarm_name, severity):