On Mon, Nov 2, 2009 at 9:06 PM, Andreas Guenther <[email protected]> wrote: > Hi, > > I am getting the below deadlock exception occasionally and so far only > on relationship operations. The code base is trunk. The system this is > running on is Linux and the Java app integrates Neo with Spring > transaction manager. Multiple threads are actively updating the Neo > storage in different ways. The only way for us to currently mitigate > this problem is to retry the entire transaction call around this, but > this only succeeds to 99%. I am using the LuceneIndexer to store a > simple Long ID value representing a node in case that helps based on the > exception message. > > I am currently thinking how to best extract this problem into a little > unit test but based on how often this happens, I haven't been able to > reproduce it in a self-contained test suite. > > Any suggestions on how to get this under control? >
Hi, Looks like a standard deadlock, two or more transactions try to modify the same data and end up in a deadlock. There are several ways to get around this. I would suggest either do some external synchronization at the beginning of the transaction (for example get a write lock on a node so transactions will execute after each other instead of race towards a potential deadlock) or modify the "node space" layout so there is a lower chance of transactions waiting on each other (similar to lock striping but you do it by having a different layout of the graph). Regards, -Johan _______________________________________________ Neo mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

