When a process has two rows A and B to write to a SQL database, and this process is executed twice concurrently, and the order of the write of the rows is different in both processes (A then B in the first, and B then A in the second), then in a transactional setting a database deadlock will occur, be detected, and end up in a ConcurrentUpdateException at the Nuxeo level for the second transaction.
One standard way of avoiding this is to write all rows in the same order in all transactions. We should modify VCS to do that.