Is it ok to update same set of documents using mgo txn from multiple processes, or will it only work in case of multiple threads in a single process?
Also if I have asserts, how they are applied?
Consider the following case
First transaction:
Read document version v1 from db
Add assert to maker sure document is still at version v1
Update document to version v2
Second transaction:
Read document version v1 from db
Add assert to maker sure document is still at version v1
Update document to version v3
If these two transactions are attempted from same process, I assume mgo txn possibly uses a mutex to make sure that assert & updates are done atomically. But if the two transactions are done from two different processes, how can mgo txn ensure that assert & updates are done atomically?