title: Data Sync between Mongodb Primary Secondary does not match
body: <p>Mon-Delay Sync delay between Primary and Secondary in Mongodb</p>
  
  <p>after <code>object.save()</code></p>
  
  <p>If you do a find, the object you just saved is not retrieved.</p>
  
  <p>In my opinion, before the object created in the <code>Primary</code> is replicated to the <code>Secondary</code>, it seems to ask for Find to confirm that there is no data in the <code>Secondary</code>.<br>
  Can you compensate for this?</p>
  
  <p>Before that, is my hypothesis correct? Does Mongodb not behave like a waiting process when there is data in Sycn through opLog?</p>
  
  <p>What are the causes and solutions?</p>
  
  <p>I changed <code>readPreferred</code> from <code>secondaryPreferred</code> to <code>primaryPreferred</code> and it worked fine.</p>
  
  <p>The problem occurs in <code>secondaryPreferred</code>.</p>
  
  <pre><code>object.save(function ( err, saved ) {
      callback(err, saved);
  });
  </code></pre>
  
  <p>I've confirmed that it may be due to asynchronous problem, but save works in the form of a callback.</p>