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

Index builds during initial sync should not implicitly create collections

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.4, 3.5.5
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2017-03-27
    • 0

      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.

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

              Created:
              Updated:
              Resolved: