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

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

    • Fully Compatible
    • v3.4
    • TIG 2017-05-08
    • 0

      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)
      

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: