2
votes

My neo4j db is in a corrupted state. A former node, also a Person node connected to a State via Address, prevents any matches from working:

match (p:Person)--(:Address)--(s:State) where s.name="Cali" return p, s

  Node with id 101005

  Neo.ClientError.Statement.EntityNotFound

I suspect this is something to do with the 101005 node still existing in the label index even though it's been deleted.

How do I recover without clearing all of the data? I've deleted all of the Person relationships/nodes and reloaded them to no avail. Using a different label ("Persons") doesn't help either.

Ubuntu, Neo4j 2.0.0 M06 when created and now on 2.0.0 stable, using cypher in the browser.

Thanks.

Edit:

Previously, when deleting other nodes, the query timed out and the db went unresponsive with a heap space exception in the logs:

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Statistics Gatherer[primitives]"
08:35:29.207 [qtp1069006536-4036] WARN  o.e.jetty.servlet.ServletHandler - Error for /db/data/transaction/commit
java.lang.OutOfMemoryError: Java heap space
1
Has anything happened to your data to make you suspect that the database is corrupt? I can't find any documentation on when EntityNotFound is thrown exactly.Nicholas
Yeah, I did a large delete of some other nodes and the query timed out, the db went unresponsive, and I had to restart it.loquax

1 Answers

3
votes

Did you see / check the manual update procedure from M06 to RC1 / 2.0-Final?

See: http://blog.neo4j.org/2013/11/neo4j-200-rc1-final-preparations.html

Caution: manual upgrade between milestones

Data stores created with any previous milestone version can not be used with 2.0.0-RC1 unless a manual upgrade is performed. This is due to incompatible changes made to the store files. Please proceed with caution, backing up your data before attempting to manually upgrade.

Manual upgrade (only from 2.0.0-M06, and after you've backed up):

Cleanly shut down on the old version on Neo4j 2.0.0-M06

  • bin/neo4j stop

Navigate to the database directory

  • cd data/graph.db

Delete the label scan store (this is the critical part that has a new format). It will be recreated on startup.

  • rm -rf schema/label

Start with the new version of Neo4j 2.0.0-RC1

  • bin/neo4j start