In a case we wish to perform multiple update operations, being atomic and in isolation in MongoDB, so that other process or threads don't get data while these are in process. I'm aware of the fact that atomicity and isolation are being supported at document level only, also locks are maintained at db level.I have following queries wrt above case:
- Is there a way we can do such multiple updates in isolation,in batch, as "$isolated" doesn't work for cluster, moreover, findAndModify() works for single document?
- How can we do Concurrency control to achieve above case?
- Can we use two phase commit here, by maintaining a transaction, will it be executed in isolated way?
- While exploring I found MongoMVCC for multi-version concurrency control, if anyone have used it please share your experiences with respect to above use case.