title: How does MongoDB handle insert/update/delete merge conflicts in case concurrent distributed writes?
body: <p>How does Mongodb handle insert/update/delete merge conflicts in case concurrent distributed writes?</p>
  
  <p>Inserts:</p>
  
  <pre class="lang-js prettyprint-override"><code>op1: insert( { _id : 'joe', age : 30 } )
  op2: insert( { _id : 'joe', age : 33 } )
  </code></pre>
  
  <p>Deletes:</p>
  
  <pre class="lang-js prettyprint-override"><code>op1: set( { _id : 'joe', age : 40 } }
  op2: delete( { _id : 'joe' } )
  op3: set( { _id : 'joe', age : 33 } )
  </code></pre>
  
  <p>Updates:</p>
  
  <pre class="lang-js prettyprint-override"><code>p1: update users set age=40 where _id='joe'
  op2: update users set state='ca' where _id='joe'
  </code></pre>