During initial sync, you must apply updates as updates and upserts as upserts, since it is possible that an in-place update will move a document backwards and cause the cloner to miss it. We need to detect this situation on the secondary. However, during normal replication, we need all updates to be upserts. Consider the situation where the oplog is replayed (possibly due to a server crash). If an update and subsequent delete are played and then replyed, the reply will hit an error on the update because the document will not exist. Converting the update to an upsert will allow oplog application to proceed; while it may result in an incomplete document, this document will be deleted soon afterward.
…ouble free on failed yield recovery.
…ult system allocator library. Pass --allocator=tcmalloc (default on Linux) or --allocator=system (default elsewhere) to control which allocator is used, and --use-system-tcmalloc to use the system- installed tcmalloc instead of the one in the mongo source tree if you use --allocator=tcmalloc.
…stall it to /usr/bin.
…filemd5. SERVER-6742 This ensures that there are no pending writebacks from the chunks being inserted.
by only checking the result object on commands. SERVER-6685 SERVER-6684