Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1862

TinkerGraph VertexProgram message passing doesn't work properly when using Direction.BOTH

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.7
    • 3.2.8, 3.3.2
    • process, tinkergraph
    • None

    Description

      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

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            spmallette Stephen Mallette
            philipgraff Philip Graff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment