Issue 1:
@blevine: 'This is expands on the issue I originally raised here: https://groups.google.com/d/topic/neo4j/-Ml0NDjKDQA/discussion

Environment:

Neo4j Community 1.8RC1

Ubuntu 12.04

Oracle JDK 1.6.0_32

I've come up with a relatively easy way to reproduce this issue without requiring you to replicate my Node.js environment.

I was able to reproduce the problem fairly easily by running an Apache Benchmark (ab) script that issued a "delete all nodes" Cypher query repeatedly and concurrently:

ab -c 10 -n 10000 -v3 -T "application/json" -p delete.json http://localhost:747

4/db/data/cypher

The delete .json file looks like:

{

"query" : "start n = node(*) DELETE n"

}

Instructions for reproducing the problem:

Bring up the neo4j console in a browser and navigate to the Data Browser tab. Be ready to start clicking the "+ Node" button to create new Nodes.

Start the ab script and immediately start clicking the "+Node" button repeatedly while the ab script is working to delete all nodes.

Eventually, the ab script will start reporting errors of the form shown below. You can of course, increase the run time of the ab script if the problem doesn't appear right away. For me, it appeared after about 2 seconds. After that point, the "delete all nodes" query will continue to return this error.

I also noticed some additional interesting behavior after this error occurred:

The console said that there were 24 nodes, but 'start n = node(*) return count(n)' returned 26.

The query 'start n = node(*) return n' produced an error: "Node[214] not found. This can be because someone else deleted ..." (note that Node 214 also appears in the original error below)

Error produced:

{

"message" : "NodeRecord[214] not in use",

"exception" : "InvalidRecordException",

"stacktrace" : [ "org.neo4j.kernel.impl.nioneo.store.NodeStore.getRecord(NodeStore.java:199)", "org.neo4j.kernel.impl.nioneo.store.NodeStore.getRecord(NodeStore.java:79)", "org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.nodeDelete(WriteTransaction.java:661)", "org.neo4j.kernel.impl.persistence.PersistenceManager.nodeDelete(PersistenceManager.java:134)", "org.neo4j.kernel.impl.core.NodeManager.deleteNode(NodeManager.java:922)", "org.neo4j.kernel.impl.core.NodeImpl.delete(NodeImpl.java:282)", "org.neo4j.kernel.impl.core.NodeProxy.delete(NodeProxy.java:67)", "org.neo4j.cypher.internal.mutation.DeleteEntityAction.org$neo4j$cypher$internal$mutation$DeleteEntityAction$$delete(DeleteEntityAction.scala:50)", "org.neo4j.cypher.internal.mutation.DeleteEntityAction.exec(DeleteEntityAction.scala:34)", "org.neo4j.cypher.internal.mutation.DeleteEntityAction.exec(DeleteEntityAction.scala:30)", "org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe.org$neo4j$cypher$internal$pipes$ExecuteUpdateCommandsPipe$$exec(ExecuteUpdateCommandsPipe.scala:52)", "org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe$$anonfun$org$neo4j$cypher$internal$pipes$ExecuteUpdateCommandsPipe$$executeMutationCommands$1$$anonfun$apply$1.apply(ExecuteUpdateCommandsPipe.scala:43)", "org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe$$anonfun$org$neo4j$cypher$internal$pipes$ExecuteUpdateCommandsPipe$$executeMutationCommands$1$$anonfun$apply$1.apply(ExecuteUpdateCommandsPipe.scala:43)", "scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)", "scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)", "scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)", "scala.collection.immutable.List.foreach(List.scala:45

....

'

Issue 2:
@blevine: 'Environment:

Neo4j Communit 1.8GA

Ubuntu 12.04

Oracle JDK 1.6.0_32-b05

Node.js/node-neo4j driver

This problem is most likely related to issue #872. After running a similar test for a while, I see the following error:

"Node[1877] concurrently deleted while loading its relationships?"

as a result of the following 'delete all' query:

start n = node(*) match n-[r?]-() delete r,n

At this point all attempts to execute that query (both programmatically and from the Data Browser) result in the same error. Nothing appears in the log related to this error.

I then went to the Data Browser and was able to view Node 1877 although all of its properties had been deleted. I then restarted the server after which Node 1877 disappeared (according to the Data Browser). I was then able to issue the 'delete all' query successfully.'