I'm evaluating several NoSQL databases, including OrientDB. I'm a OrientDB newbie, trying to write a multi-threaded test that stresses OrientDB transactions.
Here is the code (imho too long to be included here): https://github.com/PeterKnego/nosql-benchmark/blob/master/orientdb/src/main/java/net/nosql_bench/OrientDbSimpleTransact.java
It's a simple standalone test that uses a number of parallel threads that read an entity, increases the value of number
field and them save the entity, all inside a transaction.
It creates a lot of contention on one entity - that's the whole point. It kind of works, detects contention most of the time and properly rolls back the transaction.
I'm testing this on a locally installed OrientDB 2.0-rc2, client connects to it via a remote
protocol.
Any ideas why sometimes transaction collisions get detected, while sometimes they pass?