[ https://issues.apache.org/jira/browse/TINKERPOP-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16376154#comment-16376154 ]
ASF GitHub Bot commented on TINKERPOP-1862: ------------------------------------------- Github user PBGraff commented on the issue: https://github.com/apache/tinkerpop/pull/801 Hi @spmallette, I'm trying to add to the kitchen sink graph for my message passing test and I want to make sure I'm doing it right. I'm doing this in Java and calling a custom `main()`: ``` Graph g1 = TinkerGraph.open(); Graph g2 = TinkerGraph.open(); Graph g3 = TinkerGraph.open(); try { // GraphSON v1.0 g1.io(GraphSONIo.build(GraphSONVersion.V1_0)).readGraph("../tinkerpop/data/tinkerpop-sink.json"); addData(g1); g1.io(GraphSONIo.build(GraphSONVersion.V1_0)).writeGraph("tinkerpop-sink.json"); // GraphSON v2.0 g2.io(GraphSONIo.build(GraphSONVersion.V2_0)).readGraph("../tinkerpop/data/tinkerpop-sink-v2d0.json"); addData(g2); g2.io(GraphSONIo.build(GraphSONVersion.V2_0)).writeGraph("tinkerpop-sink-v2d0.json"); // Gryo g3.io(GryoIo.build()).readGraph("../tinkerpop/data/tinkerpop-sink.kryo"); addData(g3); g3.io(GryoIo.build()).writeGraph("tinkerpop-sink.kryo"); } catch (IOException e) { e.printStackTrace(); } ``` where ``` private static void addData(Graph g) { Vertex a = g.addVertex(T.id, 1L, T.label, LABEL, PROPERTYIN, VTX_A); Vertex b = g.addVertex(T.id, 2L, T.label, LABEL, PROPERTYIN, VTX_B); a.addEdge(EDGE_LABEL, b); a.addEdge(EDGE_LABEL, a); } ``` `V1_0` appears to be coming out right, but `V2_0` looks to be typed when the original isn't. Plus, I can't see how to read/write typed versions as opposed to un-typed. Gryo appears to be straightforward. Should I add a GraphML version? > 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 > Priority: Major > > 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 (v7.6.3#76005)