Atomic Operators Inside a Session

What are the repercussions of performing atomic operations such as $inc within a transaction? For instance, if I increment by 10 and then roll back the transaction, will it revert to the session’s initial value or will the transaction subtract ten?


if the other would happen (or if subtract 10 could potentially give a different result) it would means your data was by some other process. That would void the whole reason of transactions.

If my data is inside a transaction I expect any other writers not be able to update this data during my transaction.