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

Missing _id index message after dropping and re-creating _id index

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.6.6
    • Replication
    • None
    • ALL
    • Hide

      1. Create a collection with some data on a single instance deployment
      2. remove _id index (maybe only possible in 2.4)
      3. Create a replica with the data from that instance

      Show
      1. Create a collection with some data on a single instance deployment 2. remove _id index (maybe only possible in 2.4) 3. Create a replica with the data from that instance

    Description

      I have some collection that is only used for archiving (no reads). I have removed the _id index at some point (I think it was still in ver 2.4).
      Then, I started the process of upgrading to a replica set from single instance. When I connect to mongo I get the following message:

      015-01-05T10:08:39.088+0000 [initandlisten] WARNING: the collection 'stats.invalid_events' lacks a unique index on _id. This index is needed for replication to function properly
      2015-01-05T10:08:39.088+0000 [initandlisten] 	 To fix this, you need to create a unique index on _id. See http://dochub.mongodb.org/core/build-replica-set-indexes

      I created an index, but the warning still appears:

      rs1-test:PRIMARY> db.invalid_events.getIndexes()
      [
      	{
      		"v" : 1,
      		"unique" : true,
      		"key" : {
      			"_id" : 1
      		},
      		"name" : "_id_",
      		"ns" : "stats.invalid_events",
      		"background" : true
      	}
      ]

      Attachments

        Activity

          People

            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            emoshe Elad Moshe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: