title: What did MongoDB not being ACID compliant before v4 really mean?
body: <p>I am not a database expert and have no formal computer science background, so bear with me.  I want to know the kinds of <em>real world</em> negative things that can happen if you use an old <a href="https://www.mongodb.com/transactions" rel="noreferrer">MongoDB version prior to v4</a>, which were not <a href="http://en.wikipedia.org/wiki/ACID" rel="noreferrer">ACID</a> compliant.  This applies to any ACID noncompliant database.</p>
  
  <p>I understand that MongoDB can perform <a href="http://www.mongodb.org/display/DOCS/Atomic+Operations" rel="noreferrer">Atomic Operations</a>, but that they don't "support traditional locking and complex transactions", mostly for performance reasons.  I also understand the importance of database transactions, and the example of when your database is for a bank, and you're updating several records that all need to be in sync, you want the transaction to revert back to the initial state if there's a power outage so credit equals purchase, etc.</p>
  
  <p>But when I get into conversations about MongoDB, those of us that don't know the technical details of how databases are actually implemented start throwing around statements like:</p>
  
  <blockquote>
    <p>MongoDB is way faster than MySQL and Postgres, but there's a tiny chance, like 1 in a million, that it "won't save correctly".</p>
  </blockquote>
  
  <p>That "won't save correctly" part is referring to this understanding: If there's a power outage right at the instant you're writing to MongoDB, there's a chance for a particular record (say you're tracking pageviews in documents with 10 attributes each), that one of the documents only saved 5 of the attributes… which means over time your pageview counters are going to be "slightly" off.  You'll never know by how much, you know they'll be 99.999% correct, but not 100%.  This is because, unless you specifically made this a <a href="http://www.mongodb.org/display/DOCS/Atomic+Operations" rel="noreferrer">mongodb atomic operation</a>, the operation is not guaranteed to have been atomic.</p>
  
  <p>So my question is, what is the correct interpretation of when and why MongoDB may not "save correctly"?  What parts of ACID does it not satisfy, and under what circumstances, and how do you know when that 0.001% of your data is off?  Can't this be fixed somehow?  If not, this seems to mean that you shouldn't store things like your <code>users</code> table in MongoDB, because a record might not save.  But then again, that 1/1,000,000 user might just need to "try signing up again", no?</p>
  
  <p>I am just looking for maybe a list of when/why negative things happen with an ACID noncompliant database like MongoDB, and ideally if there's a standard workaround (like run a background job to cleanup data, or only use SQL for this, etc.).</p>