ACID implementation uses Pessimistic Locking versus the preferred optimistic locking in relational databases

An Example would be Order/Detail, my understanding is that you start a transaction and hold the lock until it gets the header and detail lines then commit it all at once (resource intensive) . In the relational model, the header and detail lines are each atomic transactions and are processed serially through optimistic locking. On updates the optimistic locking reads the row and update a timestamp and releases the lock. When it is time to update, sql reads the row and compares the timestamp. If the timestamps match commit else rollback to avoid the hidden update.

Is this a correct interpretation?

Hi @thehitman and welcome back :wave: !

MongoDB transaction engine is implemented with a system highly inspired from Lamport Clocks.

I found this PDF doc by googling a bit: Implementation of Cluster-wide Logical Clock and Causal Consistency in MongoDB.

I hope this helps, but it’s not a trivial question ;).

Cheers,
Maxime.