diff --git a/docs/transactions.md b/docs/transactions.md index 4251cd5d017..bafd16a0164 100644 --- a/docs/transactions.md +++ b/docs/transactions.md @@ -61,6 +61,11 @@ await db.transaction(async function setRank(session) { doc.isNew; ``` +

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. +

With Mongoose Documents and save()

If you get a [Mongoose document](documents.html) from [`findOne()`](api/model.html#model_Model-findOne)