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

Index builds during initial sync should not implicitly create collections

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • 3.4.4, 3.5.5
    • Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2017-03-27
    • 0

    Description

      Implicit collection creation is never correct during initial sync. In index builds we call getOrCreateCollection which creates the collection to index if we don't have one.

      Additionally, we do not call txn->setReplicatedWrites(false) on the operation context created for background index builds, so when those create a new collection, they also attempt to write to the oplog. This behavior should probably be changed, but the real problem is the implicit collection creation.

      Attachments

        Issue Links

          Activity

            People

              benety.goh@mongodb.com Benety Goh
              judah.schvimer@mongodb.com Judah Schvimer
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: