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

Index builds during initial sync should not implicitly create collections

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.4, 3.5.5
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      Repl 2017-03-27
    • Linked BF Score:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: