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

`background:true` is more sensible default for `createIndex()`

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.4.9
    • Component/s: None
    • Labels:
      None
    • Minor Change
    • ALL

      Per https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/#options-for-all-index-types, the `background` option defaults to `false`. This has caused operational problems on our team using MongoDB. We've forgotten `background:true` and it's blocked all database calls, causing downtime (until we could run `db.killOp()`).

      Wouldn't `background: true` be a more sensible default? I can't think of a reason we'd ever use the default that blocks all database operations. Is there a historical reason this isn't the default?

            Assignee:
            Unassigned Unassigned
            Reporter:
            brad@mixmax.com Brad Vogel
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: