diff --git a/docs/transactions.md b/docs/transactions.md index 4251cd5d017..cb3d8a93add 100644 --- a/docs/transactions.md +++ b/docs/transactions.md @@ -3,6 +3,11 @@ [Transactions](https://www.mongodb.com/transactions) let you execute multiple operations in isolation and potentially undo all the operations if one of them fails. This guide will get you started using transactions with Mongoose. +

Note About Parallelism in Transactions

+ +Running operations in parallel is **not supported** during a transaction. The use of `Promise.all`, `Promise.allSettled`, `Promise.race`, etc. to parallelize operations inside a transaction is +undefined behaviour and should be avoided. +

Getting Started with Transactions

If you haven't already, import mongoose: