Can't delete relationships nor nodes in neo4j after commit failed

时间:2015-12-10 02:04:17

标签: neo4j cypher

I was trying to import 10 million relationships across around 8 million nodes to neo4j, but the transaction failed because of my machine run out of disk space.

However, there are certain amount of relationships imported because of periodic commit. And after that I get following error

While loading relationships for Node[28941481] a
Relationship[101654465] was encountered that had startNode:
28941479 and endNode: 28941478,
i.e. which had neither start nor end node as the node we're loading relationships for

when I try to query like

MATCH ()-[r:MY_RELATION]->() RETURN r LIMIT 25;

I tried to delete the node and relationship mentioned in the error message, but seems I can't delete either of them.

So I'm wondering if I need to clean the disk and import everything again or is there anyway that I can fix my current DB?

Update:

Import statement

USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM "file:///tmp/file" AS csvLine
MATCH (e:Entity {id:toInt(csvLine.entity_id)}),(o:Other {id: toInt(csvLine.other_id)})
CREATE (e)-[:MY_RELATION {orderID:toInt(csvLine.last_id), TypeID:toInt(csvLine.ttid), state:csvLine.state}]->(other)

0 个答案:

没有答案