Is it okay to use MongoDB transactions for financial transactions

Hello.

Now that MongoDB supports multi-document ACID transactions, is okay to use them to model financial transactions, like when transferring funds from one account to another?

Yes, you can use MongoDB transactions for financial applications.

From the documentation on Transactions and Atomicity

For situations that require atomicity of reads and writes to multiple documents (in a single or multiple collections), MongoDB supports multi-document transactions:

  • In version 4.0 , MongoDB supports multi-document transactions on replica sets.
  • In version 4.2 , MongoDB introduces distributed transactions, which adds support for multi-document transactions on sharded clusters and incorporates the existing support for multi-document transactions on replica sets.

To use transactions on MongoDB 4.2 deployments (replica sets and sharded clusters), clients must use MongoDB drivers updated for MongoDB 4.2

If I was to await several queries inside a Promise.all() which was inside an acid transaction, would it roll back all the other transactions if one failed?

Basically what I’m asking is, do acid transactions work when using promise.all() ?