Concurrency Problems

Skip to first unread message

Wendy Cameron

Dec 22, 2014, 7:18:18 AM12/22/14
I have been going through my concurrency issues and have identified the source of the problem.

Essentially we create a complex hierarchical structure with the lowest level of documents being questions these questions are shared or references in a number of different hierarchical document structures.  Just to make things more interesting we create an answer structure which mirrors this nested document structure to capture users answers in a similar hierarchical format to the document itself.  This is all fabulous NoSQL structures using hierarchical data sets for what they are good for. 

However the issues is every time I cascade save the answer structure which has a whole stack of references to objects from the template document somehow Orientdb picks up these nested reference objects as having been modified when in fact the object has not been modified at all and tries to save these objects.  So when running in a multi threaded environment the cascade saves result in the same questions trying to be updated in a concurrent way and as a result you get a concurrency update error.

Interestingly this problem happens to different degrees under different OS's and different JVM implementations ie from Windows to Mac to Ubuntu we experience different levels of exceptions etc which kind of suggests this is some kind of low level problem.

But essentially the object is being marked as modified when none of the values have changed and the object has not modified in an way shape or form.  I loosely think this kind of versioning and modification detection is done and low level byte code augmentation way. Something I have not dug down into debugging and sorting out issues with.

I am currently experimenting with detaching the entities that have not been modified and then cascade saving the objects with references to first pass testing indicates this might be a successful strategy.

I look forward to a response and some guidance on whether this is an orientdb problem or a problem with the way I am doing things.  Or could this be an interaction between spring-orient-data and orientdb.

Andrey Lomakin

Dec 26, 2014, 10:27:09 AM12/26/14
to orient-database
HI Wendy,
What database do  you use Object database, or Graph database ?
We do suggest you to use Graph database instead of Object because Graph  database is much more robust than Object one.


You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Best regards,
Andrey Lomakin.

Reply all
Reply to author
0 new messages