What did MongoDB not being ACID compliant before v4 really mean?

It’s actually not correct that MongoDB is not ACID-compliant. On the contrary, MongoDB is ACID-compilant at the document level.

Any update to a single document is

  • Atomic: it either fully completes or it does not
  • Consistent: no reader will see a “partially applied” update
  • Isolated: again, no reader will see a “dirty” read
  • Durable: (with the appropriate write concern)

What MongoDB doesn’t have is transactions — that is, multiple-document updates that can be rolled back and are ACID-compliant.

Note that you can build transactions on top of the ACID-compliant updates to a single document, by using two-phase commit.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)