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

Cannot remove _id_ index from capped collection

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • Labels:
      None
    • Storage Execution
    • ALL

      If for some reason you create a {_id:1} index on capped collection, there is no way to remove it.

      both dropIndex("id") and .dropIndexes() fail

      > db.testCapped.dropIndex("id")

      { "nIndexesWas" : 1, "errmsg" : "may not delete _id index", "ok" : 0 }

      > db.testCapped.dropIndexes()
      {
      "nIndexesWas" : 1,
      "msg" : "non-_id indexes dropped for collection",
      "ok" : 1
      }

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: