-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug traversing GremlinPipeline with out() and outE().inV() #1738
Comments
A second bug for the same test case in this query:
In this second case:
so I would expected System.out be printing [the_target_node] but result is [] instead. Same thing if using .out() to traverse |
Please may you provide me a database with such vertices to debug what happens? |
The piece of code above creates and drops the 2 vertices and edge required to recreate the issue.
Just copy and paste the code in first message on any database and you will be able to recreate the issue. There is a second issue in the second message as well |
I think I have narrowed down the issue by trying to use a generic transform() pipe (where out(), outE() and the like comes from). If we place the following transform pipe instead out() in the test case:
the same exception is thrown once again in vertex.getEdges(Direction.OUT).iterator().next(). Therefore it looks a problem fetching edges of a vertex by using Blueprints API. It would explain all exceptions reported in this thread. java.util.NoSuchElementException By the way, same issue for vertex.getVertices(Direction.OUT).iterator().next(). |
found this message in list https://groups.google.com/forum/#!topic/orient-database/sXOVuCF5Om0 stating that OrientVertex.getEdges() was fixed for latest snapshots Tested the test case in this thread with very latest snapshot orientdb-1.6.0-20131011.195757-105-distribution and still same exceptions are thrown. |
Adolfo, if you can provide me a test case for this I'm pretty confident I can fix in short time. |
Luca, the test case is in the first message of this thread. |
I see you connected to a remote db, so I guess I'd need it. However I replaced remote:... to memory: and everything works. I've also removed #26:0 by using the sourceDoc's identity:
So is it a problem of remote protocol? |
Can you please try to add the remote storage and invoke remotely? (just run test case)
yes, I am creating remotely 2 vertices and an edge and querying remotely as well. It looks more an issue with next() of the iterator. Maybe running next() remotely is accessing disk and not when done in memory. Not idea. (But, it does not need to be right now....) |
Hi - I also have encountered this bug. In gremlin, start().outE().inV() returns [ ] |
The problem is how you create the graph using the OLD GraphDB API. Try this and works:
|
…lity(true) to open old database and OGraphDatabaseMigration tool to migrate it
The problem is that old native API uses "out" and "in" for vertices edges. The new one has "out_" and "in_", so I've added a new OGraphDatabase.setRetroCompatibility(true) that allows to open database created with previous releases. But now by default uses the new one that is compatible with TinkerPop stack and Gremlin of course. To convert old database with the new format we've a migration tool:
It converts all "out" -> "out_" and "in" -> "in_". |
Could you attach an example of the migration tool command (in particular database-url section) ? I have this "in"/"out" bug, too. I'm using an embedded Orient database and sometimes I don't receive all the expected vertices. |
Example:
|
Can I substitute $ORIENTDB_HOME with the path to the OrientDB's jars in my Eclipse project? (please remember that I'm embedding OrientDB in my application) |
The important is giving the path of libraries |
As a follow up of this thread in groups (https://groups.google.com/forum/#!topic/orient-database/rGMofFJ-Pww), as I my responses are automatically deleted, I post a new issue here.
The following code includes a test case for this:
Code is adding a simple structure
source ---------------------> target
When lines in the middle of both filters are commented, result is as expected:
1vertex->v(SourceNodeType)[#26:0]; props: [out]
2vertex->v(SourceNodeType)[#26:0]; props: [out]
v(SourceNodeType)[#26:0]
When any of the lines in the middle of the filters is uncommented, result is:
1vertex->v(SourceNodeType)[#26:0]; props: [out]
Exception in thread "main" java.util.NoSuchElementException
at com.tinkerpop.blueprints.impls.orient.OrientElementIterator.next(OrientElementIterator.java:32)
at com.tinkerpop.blueprints.impls.orient.OrientElementIterator.next(OrientElementIterator.java:13)
at com.tinkerpop.pipes.util.iterators.HistoryIterator.next(HistoryIterator.java:25)
at com.tinkerpop.pipes.IdentityPipe.processNextStart(IdentityPipe.java:19)
at com.tinkerpop.pipes.AbstractPipe.next(AbstractPipe.java:89)
at com.tinkerpop.pipes.filter.FilterFunctionPipe.processNextStart(FilterFunctionPipe.java:23)
at com.tinkerpop.pipes.AbstractPipe.next(AbstractPipe.java:89)
at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(VertexQueryPipe.java:85)
at com.tinkerpop.pipes.transform.VertexQueryPipe.processNextStart(VertexQueryPipe.java:19)
at com.tinkerpop.pipes.AbstractPipe.next(AbstractPipe.java:89)
at com.tinkerpop.pipes.transform.EdgesVerticesPipe.processNextStart(EdgesVerticesPipe.java:37)
at com.tinkerpop.pipes.transform.EdgesVerticesPipe.processNextStart(EdgesVerticesPipe.java:12)
at com.tinkerpop.pipes.AbstractPipe.next(AbstractPipe.java:89)
at com.tinkerpop.pipes.filter.FilterFunctionPipe.processNextStart(FilterFunctionPipe.java:23)
at com.tinkerpop.pipes.AbstractPipe.next(AbstractPipe.java:89)
at com.tinkerpop.pipes.util.Pipeline.next(Pipeline.java:115)
at com.vaalbara.dao.Test2.main(Test2.java:59)
Result of queries:
so results are there.
It looks a bug in traversing the GremlinPipeline with out() and outE().inV().
The text was updated successfully, but these errors were encountered: