ACID across documents (Replica Set required)
Transactions group multiple operations — all commit or all abort. Requires replica set deployment (even single-node RS for dev).
Quirk: Transactions have overhead. Prefer atomic single-document updates when possible. Use transactions when you actually need them.
Output
Press Run to execute your code.