Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-657

Docs don't cover some details regarding ensureIndex()

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      The documentation doesn't cover the following about the behavior of ensureIndex():

      • What happens when multiple ensureIndex commands are run at the same time. (Answer: if there is no index present, the first will create the index entry in the system.indexes collection, and the rest are no-ops.)
      • Noting that all ensureIndex() does is put an entry in the 'system.indexes' collection, which immediately kicks off the index build operation
      • Noting that there is no way to interrupt an index build once it has begun
      • Emphasising that all other operations will block while an index build is in progress

            Assignee:
            sam.kleinman Sam Kleinman (Inactive)
            Reporter:
            william.zola@10gen.com William Zola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              11 years, 27 weeks, 6 days ago