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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.6.6
    • Component/s: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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
      	}
      ]
      

            Assignee:
            Ramon Fernandez Marina
            Reporter:
            Elad Moshe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: