You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Florian G (Jira)" <ji...@apache.org> on 2022/02/23 13:34:00 UTC
[jira] [Created] (TINKERPOP-2712) PropertyChangedEvent is triggered before Property is actually changed
Florian G created TINKERPOP-2712:
------------------------------------
Summary: PropertyChangedEvent is triggered before Property is actually changed
Key: TINKERPOP-2712
URL: https://issues.apache.org/jira/browse/TINKERPOP-2712
Project: TinkerPop
Issue Type: Bug
Components: process
Affects Versions: 3.5.2
Reporter: Florian G
[Event|https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java]s are triggered when the graph changes, including additions and deletions.
In my understanding, all events are triggered at a point in time where the modified element is either still present in the graph (i.e. right before removal) or already present in the graph (i.e. right after insertion).
As can be seen in [DropStep|https://github.com/apache/tinkerpop/blob/7f7d3a485c7f100f98047b71672a0c2c9ab855b4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/DropStep.java], [AddVertexStep|https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStep.java], [AddVertexStartStep|https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java], [AddEdgeStep|https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java] and [AddEdgeStartStep|https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStartStep.java], this observation holds true. However, [AddPropertyStep|https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java] breaks this rule and triggers the event before the property is available in the graph.
This causes issues whenever users want to perform further actions on recently added elements, as vertices and edges are present in the graph, while properties are not.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)