Traversing issue Similar to #1738 is noticed with OrientDB Version 2.0.4
There seems to be an issue with lazy loading data when using
GremlinPipeline with OrientDB. When run from command line, only immediate
edge is retrieved. But in eclipse debugger, when stepped through
gremlinpipeline code, all the edges are retrieved.
Sample Graph
1 --> 2 --> 3 --> 4 --> 5 --> 6
For given vertex 1, i want to retrieve vertices 2,3,4,5,6
Database entries
Vertices
----+------+------+------------------------------------+---------+--------------+--------+--------
# |@RID |@CLASS|out |in
----+------+------+------------------------------------+---------+--------------+--------+--------
0 |#9:120|V |[size=1]|null
1 |#9:121|V ||[size=1]|[size=1]
2 |#9:122|V ||[size=1]|[size=1]
3 |#9:123|V ||[size=1]|[size=1]
4 |#9:124|V ||[size=1]|[size=1]
5 |#9:125|V ||null |[size=1]
Edges
----+-------+------------+------+------+-------------
# |@RID |@CLASS |out |in |
----+-------+------------+------+------+-------------
0 |#11:100|parent_child|#9:120|#9:121|
1 |#11:101|parent_child|#9:121|#9:122|
2 |#11:102|parent_child|#9:122|#9:123|
3 |#11:103|parent_child|#9:123|#9:124|
4 |#11:104|parent_child|#9:124|#9:125|
----+-------+------------+------+------+-------------
Source Code used to test
Set<Vertex> x = new HashSet<>(Collections.singleton(v));
GremlinPipeline<Object, ?> pipe =
new GremlinPipeline<>(v)
.as("x")
.out()
//.outE("parent_child").inV()
.except(x)
.store(x)
.loop("x",
new
PipeFunction<LoopPipe.LoopBundle<Vertex>, Boolean>() {
@Override
public
Boolean compute(
LoopPipe.LoopBundle<Vertex> bundle) {
System.out.println(" 1111 " + bundle.getObject().getId());
return
true;
}
},
new
PipeFunction<LoopPipe.LoopBundle<Vertex>, Boolean>() {
@Override
public
Boolean compute(
LoopPipe.LoopBundle<Vertex> bundle) {
System.out.println(" 2222 " + bundle.getObject().getId());
return
true;
}
}).path();
//gather()
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.