[ https://issues.apache.org/jira/browse/TINKERPOP-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16325429#comment-16325429 ]
ASF GitHub Bot commented on TINKERPOP-1862: ------------------------------------------- GitHub user PBGraff opened a pull request: https://github.com/apache/tinkerpop/pull/777 TINKERPOP-1862 TinkerMessenger proper handling of Direction.BOTH New PR targeted to `tp32` branch. Fixes `TinkerMessenger` handling of direction to get the correct messages. Also now adds a set of tests to `GraphComputerTest` to test this message passing in a simple graph with a simple vertex program in all directions (`IN`, `OUT`, and `BOTH`). You can merge this pull request into a Git repository by running: $ git pull https://github.com/PBGraff/tinkerpop TINKERPOP-1862 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tinkerpop/pull/777.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #777 ---- commit 5e157faebfe971c3ef06ac5365993052021a95fb Author: Graff, Philip B <philip.graff@...> Date: 2018-01-04T18:27:44Z TinkerMessenger proper handling of Direction.BOTH commit 01a9ee5ae80fd429726d0722edae3195d9a625c5 Author: Graff, Philip B <philip.graff@...> Date: 2018-01-14T02:32:29Z Adding simple graph computer test of proper message passing in all 3 directions ---- > TinkerGraph VertexProgram message passing doesn't work properly when using > Direction.BOTH > ----------------------------------------------------------------------------------------- > > Key: TINKERPOP-1862 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1862 > Project: TinkerPop > Issue Type: Bug > Components: process, tinkergraph > Affects Versions: 3.2.7 > Reporter: Philip Graff > > I think the messages are being sent properly in TinkerMessenger, but when I > call messenger.receiveMessages(), the vertex is getting messages from the > outVertex of their edges regardless of the edge direction. This is due to > line 71 of TinkerMessenger (linked below) which calls > Edge.vertices(direction).next(), thus getting the first result out of the > Vertex iterator. For IN or OUT, this isn't a problem. But for BOTH, following > line 124 of TinkerEdge (linked below), the outVertex is always returned > first. TinkerMessenger needs to be modified to return the correct vertex (I > think it's the one that != this.vertex). > https://github.com/apache/tinkerpop/blob/master/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/process/computer/TinkerMessenger.java#L71 > https://github.com/apache/tinkerpop/blob/master/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerEdge.java#L124 -- This message was sent by Atlassian JIRA (v6.4.14#64029)