When i login to mongo shell I am getting.:
WARNING: the collection 'dummy-collection-name' lacks a unique index on _id. This index is needed for replication to function properly
Note: This warning shows up only on login to mongo shell on few shards not on all shards
The _id is a Object Id which is generated automatically on insert so it should be unique and no way it can be duplicate. Also the insert would have failed right away if there is duplicate id. But according to error the collection currently has duplicate ids. How is this possible ?
Any help would be highly appreciated.
Thanks and Regards,
Praveen