Neo4j batchInserter exception

485 views Asked by At

I have a Batch Inserter that build a data model in Neo4j, but I have an error on creating relationship between nodes, not all relationships but some of them.

Here's the exception:

org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: RelationshipRecord[someID] not in use

and it's thrown in that line:

long relId = inserter.createRelationship(node1ID, node2ID,RelTypes.My_REL,node1TOnode2RelProps);

Any help would be greatly appreciated..


Here's the stacktrace

org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: RelationshipRecord[454889] not in use
at org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:254)
at org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:87)
at org.neo4j.unsafe.batchinsert.BatchInserterImpl.connect(BatchInserterImpl.java:783)
at org.neo4j.unsafe.batchinsert.BatchInserterImpl.connectRelationship(BatchInserterImpl.java:773)
at org.neo4j.unsafe.batchinsert.BatchInserterImpl.createRelationship(BatchInserterImpl.java:758)
at com.arrow.cloud.rec.bl.threads.PassRelationCall.buildPassRelation(PassRelationCall.java:395)
at com.arrow.cloud.rec.bl.threads.PassRelationCall.call(PassRelationCall.java:51)
at com.arrow.cloud.rec.bl.threads.PassRelationCall.call(PassRelationCall.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
1

There are 1 answers

2
Mattias Finné On

Are you using multiple threads in your batch insertion? If so then things are going to break. I spotted a ThreadPoolExecutor in the stack trace so that's why I ask.