Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28989

Avoid dropping dummy database in ReplSetTest.prototype.checkReplicaSet()

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.4
    • Sprint:
      TIG 2017-05-08
    • Linked BF Score:
      0

      Description

      The ReplSetTest.prototype.checkReplicaSet() function drops the dummy database to avoid leaving around any unnecessary data files; however, repeatedly creating and dropping a database with a unique name incurs a significant amount of I/O overhead when running with the MMAPv1 storage engine since data files must be allocated and deleted each time, respectively. Given that the procedure for flushing any pending background index builds is performed by running a "collMod" command for each collection, there's no requirement that the database for the w=all replicated write needs to have a unique name.

      // Since we cannot determine if there is a background index in progress (SERVER-26624),
      // we flush indexing as follows:
      //  1. Iterate through all collections and run collMod against each (collMod will block
      //     replication to wait for any active background index builds to complete)
      //  2. Insert a document into a dummy collection with a writeConcern for all nodes (which
      //     will block on completion of the background index build + collMod)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: