[ 
https://issues.apache.org/jira/browse/TINKERPOP-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496793#comment-17496793
 ] 

ASF GitHub Bot commented on TINKERPOP-2712:
-------------------------------------------

rngcntr commented on pull request #1573:
URL: https://github.com/apache/tinkerpop/pull/1573#issuecomment-1048821631


   It appears the change is a little bit trickier than I initially expected. 
Due to the earlier modification of the graph, the events are now initialized 
with wrong parameters. I will have another look at it and fix the events if 
possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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
>            Priority: Minor
>
> [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)

Reply via email to