JanusGraph / janusgraph

JanusGraph: an open-source, distributed graph database
https://janusgraph.org
Other
5.3k stars 1.17k forks source link

Getting java null pointer exception due to malformed data in any property of nodes or edges #4141

Closed ibtesamlatif2997 closed 10 months ago

ibtesamlatif2997 commented 11 months ago

Please include configurations and logs if available.

For confirmed bugs, please report:

If there is any corrupted node or edge. I should be able to delete it and recreate it and following queries should work on that node

  1. g.V(id).drop().iterate()
  2. g.V(id).valueMap()
  3. g.V(id).properties("is_deleted").drop()

When there is a malformed value in any property in the node or edge. I am getting null pointer exception and because of that issue I can't delete that node and can't modify that node and unable to traverse on other nodes when this kind of node came in traversing. The problem is that I am dealing with big data and now due to some problematic nodes I am getting null pointer exception error on getting data and there is no way to delete the node and recreate it or modify the properies. Please I need help as I don't want to delete whole data and run my ETL jobs again

  1. g.V(id).drop().iterate() gives null pointer exception
  2. g.V(id).valueMap() gives null pointer exception
  3. g.V(id).properties("is_deleted").drop() gives null pointer exception
  1. I have the property is_deleted of type boolean. I saved the property value for one node as true (boolean)
  2. Run command g.V(id).valueMap() will show all properties of that node
  3. Now for the same node add value of is_deleted as "true" (string).
  4. Run command g.V(id).valueMap(). Now i am getting null pointer exception
  5. I can't delete this node, can't delete the property of that node, and cant modify the value of is_deleted to make it correct
  6. g.V(id).drop().iterate() gives null pointer exception
  7. g.V(id).valueMap() gives null pointer exception
  8. g.V(id).properties("is_deleted").drop() gives null pointer exception

Stack Trace (if you have one)

    'stackTrace' => 'java.lang.NullPointerException\n' +
      '\tat org.janusgraph.graphdb.database.EdgeSerializer.parseRelation(EdgeSerializer.java:115)\n' +
      '\tat org.janusgraph.graphdb.database.EdgeSerializer.readRelation(EdgeSerializer.java:83)\n' +
      '\tat org.janusgraph.graphdb.transaction.RelationConstructor.readRelation(RelationConstructor.java:70)\n' +
      '\tat org.janusgraph.graphdb.transaction.RelationConstructor$1.next(RelationConstructor.java:57)\n' +
      '\tat org.janusgraph.graphdb.transaction.RelationConstructor$1.next(RelationConstructor.java:45)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep.processNextStart(FlatMapStep.java:45)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:55)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep.processNextStart(FlatMapStep.java:48)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:55)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep.processNextStart(FilterStep.java:40)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:55)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectOneStep.processNextStart(SelectOneStep.java:58)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:55)\n' +
      '\tat org.janusgraph.graphdb.tinkerpop.optimize.step.JanusGraphMultiQueryStep.processNextStart(JanusGraphMultiQueryStep.java:111)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:47)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep.processAllStarts(NoOpBarrierStep.java:67)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep.processNextStart(NoOpBarrierStep.java:56)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:55)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.ScalarMapStep.processNextStart(ScalarMapStep.java:39)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:55)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectOneStep.processNextStart(SelectOneStep.java:58)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:55)\n' +
      '\tat org.janusgraph.graphdb.tinkerpop.optimize.step.JanusGraphMultiQueryStep.processNextStart(JanusGraphMultiQueryStep.java:111)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.hasNext(ExpandableStepIterator.java:47)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep.processAllStarts(NoOpBarrierStep.java:67)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.NoOpBarrierStep.processNextStart(NoOpBarrierStep.java:56)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:55)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.ScalarMapStep.processNextStart(ScalarMapStep.java:39)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:55)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectStep.processNextStart(SelectStep.java:68)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)\n' +
      '\tat org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:192)\n' +
      '\tat org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor.handleIterator(AbstractOpProcessor.java:98)\n' +
      '\tat org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.lambda$evalOpInternal$6(AbstractEvalOpProcessor.java:267)\n' +
      '\tat org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:283)\n' +
      '\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n' +
      '\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n' +
      '\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n' +
      '\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n' +
      '\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n' +
      '\tat java.base/java.lang.Thread.run(Thread.java:829)\n',
    'exceptions' => [ 'java.lang.NullPointerException' ]
  }
}
ibtesamlatif2997 commented 11 months ago

@porunov Please brother it will be great if you can help me