Explain the limitations of MongoDB Transactions

  1. You cannot write to capped collections. Capped collections are fixed-size collections that support high-throughput operations that insert and retrieve documents based on insertion order.
  2. You cannot use read concern "snapshot" when reading from a capped collection. A snapshot is a complete copy of the data in a mongod instance at a specific point in time. You can retrieve snapshot metadata for the whole cluster or replica set, or for a single config server in a cluster.
  3. You cannot read/write to collections in the config, admin, or local databases.
  4. You cannot write to system.* collections.
  5. Transactions have a lifetime limit as specified by transactionLifetimeLimitSeconds . The default is 60 seconds.

Sources:

Transactions — MongoDB Manual. mongodb.com/docs/manual/core/transactions.