orientechnologies / orientdb-gremlin

TinkerPop3 Graph Structure Implementation for OrientDB
Apache License 2.0
91 stars 32 forks source link

NullPointerException on simple queries #117

Open bblonski opened 7 years ago

bblonski commented 7 years ago

I have several times run into a NullPointerException on OrientEdge:48. The rawDocument comes back null and throws the NPE on rawDocument.getClassName(). I'm not sure what's causing the issue. Inspecting the database shows no issues and the queries will work for a time until suddenly they do not and will consistently throw NPEs until the database is reset.

Version is v3.2.3.0 against OrientDB server v2.2.10.

bblonski commented 7 years ago

Further investigation seems to indicate the issue occurs when records are removed from the database. The traversal still tries to iterate through missing vertices which causes the null pointers. I've tracked it back farther to OrientVertex:65. The call to .rawIterator() appears to return deleted vertices. Perhaps the call should be to .iterator() instead?

ken-at-sri commented 7 years ago

In addition to calling .iterator() as bblonski suggested, I added a filter to ignore any nulls while streaming over the collection. This appears to have fixed the issue we were having.

luigidellaquila commented 6 years ago

Hi @bblonski

Is this issue still valid? I checked the code but too many things have changed, so the patch from @ken-at-sri cannot be applied anymore

Thanks

Luigi

luigidellaquila commented 6 years ago

Ops, sorry, checked the wrong implementation (TinkerPop2), assigning to @maggiolo00 for a check

Thanks

Luigi