The subgraph() step returns a Graph instance via GraphBinary. This however results in an exception for JanusGraph (see stack trace below).
I first found this with our productive setup which uses CQL + ES, but could also reproduce it with the vanilla Docker image using Berkeleyje + Lucene by just adding two vertices and an edge between them and then executing the traversal (see steps to reproduce).
While this sounds similar to #2843, I think that it's a different issue because there the problem is that no serializer for the type can be found. With GraphBinary here we're getting a completely different exception and the stack trace already shows that the correct serializer for the graph type was used: GraphSerializer.
For confirmed bugs, please report:
Version: 0.6.1
Storage Backend: berkeleyje / cql
Mixed Index Backend: lucene / elasticsearch
Link to discussed bug:
Expected Behavior: The subgraph should be returned to the client.
Current Behavior: See the exception below.
Steps to Reproduce: Configure GraphBinary in the client and execute a traversal that returns a graph, e.g,, g.E().subgraph('sg').cap('sg').next().
Stack Trace (if you have one)
org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor - The result [[tinkergraph[vertices:2 edges:1]]] in the request 80f14092-8ace-410b-bde9-46d4bd857f3b could not be serialized and returned.
java.lang.IllegalStateException
at com.google.common.base.Preconditions.checkState(Preconditions.java:492)
at org.janusgraph.graphdb.relations.RelationIdentifier.getInVertexId(RelationIdentifier.java:63)
at org.janusgraph.graphdb.tinkerpop.io.binary.RelationIdentifierGraphBinarySerializer.writeNonNullableValue(RelationIdentifierGraphBinarySerializer.java:43)
at org.janusgraph.graphdb.tinkerpop.io.binary.RelationIdentifierGraphBinarySerializer.writeNonNullableValue(RelationIdentifierGraphBinarySerializer.java:24)
at org.janusgraph.graphdb.tinkerpop.io.binary.JanusGraphTypeSerializer.writeValue(JanusGraphTypeSerializer.java:89)
at org.janusgraph.graphdb.tinkerpop.io.binary.JanusGraphTypeSerializer.write(JanusGraphTypeSerializer.java:72)
at org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryWriter.write(GraphBinaryWriter.java:98)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.GraphSerializer.writeVertex(GraphSerializer.java:138)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.GraphSerializer.writeValue(GraphSerializer.java:120)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.GraphSerializer.writeValue(GraphSerializer.java:45)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.SimpleTypeSerializer.writeValue(SimpleTypeSerializer.java:91)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.SimpleTypeSerializer.write(SimpleTypeSerializer.java:73)
at org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryWriter.write(GraphBinaryWriter.java:112)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.CollectionSerializer.writeValue(CollectionSerializer.java:52)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.ListSerializer.writeValue(ListSerializer.java:44)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.ListSerializer.writeValue(ListSerializer.java:29)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.SimpleTypeSerializer.writeValue(SimpleTypeSerializer.java:91)
at org.apache.tinkerpop.gremlin.structure.io.binary.types.SimpleTypeSerializer.write(SimpleTypeSerializer.java:73)
at org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryWriter.write(GraphBinaryWriter.java:112)
at org.apache.tinkerpop.gremlin.driver.ser.binary.ResponseMessageSerializer.writeValue(ResponseMessageSerializer.java:84)
at org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1.serializeResponseAsBinary(GraphBinaryMessageSerializerV1.java:150)
at org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor.makeFrame(AbstractOpProcessor.java:291)
at org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor.handleIterator(AbstractOpProcessor.java:167)
at org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.lambda$evalOpInternal$5(AbstractEvalOpProcessor.java:263)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:283)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The
subgraph()
step returns aGraph
instance via GraphBinary. This however results in an exception for JanusGraph (see stack trace below).I first found this with our productive setup which uses CQL + ES, but could also reproduce it with the vanilla Docker image using Berkeleyje + Lucene by just adding two vertices and an edge between them and then executing the traversal (see steps to reproduce).
While this sounds similar to #2843, I think that it's a different issue because there the problem is that no serializer for the type can be found. With GraphBinary here we're getting a completely different exception and the stack trace already shows that the correct serializer for the
graph
type was used:GraphSerializer
.For confirmed bugs, please report:
g.E().subgraph('sg').cap('sg').next()
.Stack Trace (if you have one)