Read more: http://wiki.neo4j.org/content/Transactions#Nested_transactions http://docs.neo4j.org/chunked/milestone/transactions.html
2011/2/17 David Montag <david.mon...@neotechnology.com> > John, > > Are you doing tx.success() and tx.finish() when you commit? If so, then you > likely already have an open transaction for that thread. > > If you start a new transaction while already in an open transaction, you > will get a dummy transaction. It will not do anything when you commit it > successfully, but if it fails, the parent transaction will fail. The data > in > the nested transaction only gets committed when the parent transaction > commits. So if you've lost the reference to the top-level transaction, > that's an issue. > > Also, if you'd like to share the code, I'd be glad to have a look at it. > > David > > On Wed, Feb 16, 2011 at 10:00 PM, John Howard <johnyho...@gmail.com> > wrote: > > > We found this strange behaviour with regard to transactions ( we use > > neo1.3-SNAPSHOT) > > Here are the steps in our application: > > > > 1. created,indexed and commited 10 nodes successfully > > 2. created, indexed and commited 40 nodes successfully > > 3. created, indexed and commited 900 nodes successfully > > 4. we found some app specific mistake in the step 3. So we removed > indexes, > > deleted 900 nodes and commited successfully. > > 5. we tried to query those deleted nodes just to confirm whether delete > was > > successful. > > 6. we were able to search for 900 (deleted)nodes from the index, and when > > we > > tried to access a property of a (deleted) node, it threw the following > > exception: > > java.lang.IllegalStateException: Node[7599] has been deleted in this tx > > at > > > > > org.neo4j.kernel.impl.core.LockReleaser.getCowPropertyRemoveMap(LockReleaser.java:445) > > at > > > > > org.neo4j.kernel.impl.core.NodeManager.getCowPropertyRemoveMap(NodeManager.java:898) > > at > > org.neo4j.kernel.impl.core.Primitive.getPropertyKeys(Primitive.java:99) > > at > > org.neo4j.kernel.impl.core.NodeProxy.getPropertyKeys(NodeProxy.java:129) > > at > > neopoc.data.util.graphManager.getNodesProperties(graphManager.java:771) > > > > 7. As a result of the above exception, it rolled back step 1 & 2 as well. > > So > > we lost all the nodes. > > > > My suspicion is, even though we committed successfullly in the steps 1, > 2, > > 3, 4, they were never internally committed. May be some kind of > > differed/lazy commit and not immediate commit. > > > > Thank you for your assistance. > > > > - > > _______________________________________________ > > Neo4j mailing list > > User@lists.neo4j.org > > https://lists.neo4j.org/mailman/listinfo/user > > > > > > -- > David Montag > Neo Technology, www.neotechnology.com > Cell: 650.556.4411 > david.mon...@neotechnology.com > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user