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

Cannot remove _id_ index from capped collection

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Index Maintenance
    • None
    • Storage Execution
    • ALL

    Description

      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
      }

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: