Index builds during initial sync should not implicitly create collections

XMLWordPrintableJSON

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

      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
              Reporter:
              Judah Schvimer
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: