[SERVER-19998] Collection lacks a unique index on _id on 3.0 secondary with 2.6 primary Created: 18/Aug/15 Updated: 26/Sep/15 Resolved: 26/Sep/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Replication |
| Affects Version/s: | 2.6.3, 3.0.4 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Minor - P4 |
| Reporter: | Menneni [X] | Assignee: | Ramon Fernandez Marina |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Mongo shell showing following warning WARNING: the collection 'n.user' lacks a unique index on _id. This index is needed for replication to function properly We have added a new secondary member (version 3.0) to an existing replica set with three members (version 2.6). Why this collection lacks indexes ? and mongo suggests to create index by stopping secondary and creating index by running it in a new port. How much time this takes to build new index and if add this member to replica after index creation, will it sync automatically ? if this process takes more time than oplog length(17 hrs) what are the complications ? |
| Comments |
| Comment by Ramon Fernandez Marina [ 24/Aug/15 ] |
|
Thanks for the information Menneni. If all nodes are running MMAPv1, then to investigate further we'll need the full logs of the 3.0.4 node since it first started; I hope to find some indication of why the _id index you mention is missing. Thanks, PS: the replSetName uniquely identifies a replica set, and it can't be changed. |
| Comment by Menneni [X] [ 19/Aug/15 ] |
|
@Ramon Fernandez, Thanks for the reply. We are using mmapv1 engine. Yes, our nodes are running on 2.6.3 and 3.0.4 versions. On a different note, I would like to understand what happens if an existing secondary is restarted with different replSetName. |
| Comment by Ramon Fernandez Marina [ 19/Aug/15 ] |
|
Menneni, if I understand correctly from the ticket description your 2.6 nodes are running 2.6.3 and your 3.0 node is running 3.0.4, but are you using the WiredTiger storage engine in the 3.0 node? If the answer is yes you'll need to upgrade your 2.6 nodes to 2.6.8 first. |