we are currently facing the following error when inserting data in our preproduction database since we are using orientdb in a multi cluster architecture:
com.orientechnologies.orient.server.distributed.task.ODistributedRecordLockedException: Timeout (1000ms) on acquiring lock on record #-1:-1 on server ‘DeadLock’. It is locked by request 0.168809
It is currently a blocker for us to use orient in production as it is unable to solve the deadlock without restarting the db.
The first thing I was asking myself was: As I am using pessimistic locking I would not expect that deadlock situation at all. So what is causing this behaviour and how can I avoid it?
I found some GitHub issues and StackOverflow articles about that issue and the only info I was able to extract was that it has somehow to do with the execution mode. Right now we have mode ‘undefined’ set (which is default according to the documentation). According to Luca Garulli who answered in one of the stackoverflow articles, “undefined means synchronous, unless you specify something different via API” in version > 2.2. But we are using 3.0.13 and it is still not working.
Thanks in advance