[SERVER-17473] Deleting index on primary doesnt delete on secondary Created: 05/Mar/15 Updated: 16/Mar/15 Resolved: 16/Mar/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 2.6.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | prashant deva | Assignee: | Ramon Fernandez Marina |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
I have an index of type unqiue=true. I know for sure we deleted it on a primary in our 3 node cluster. |
| Comments |
| Comment by Ramon Fernandez Marina [ 16/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
pdeva, I was wondering whether your primary changed before the index drop operation got replicated to the secondary. I tried to reproduce that scenario on my end, unsuccessfully. And without detailed logs from your setup there's not enough information for us to investigate further. What I would suggest is that, if this happens again, you collect the indexes from both primary and secondaries as you did above and upload full logs for all the nodes involved. Until then, I'm going to resolve this ticket. Regards, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by prashant deva [ 12/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ok rs.slaveOk() worked. output: dsmongo-5 (secondary)
dsmongo-6 - secondary
dsmongo-4 - primary
so at the moment, the indexes do seem fine. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 12/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Call rs.slaveOk() first. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by prashant deva [ 12/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
i even tried logging in as root user in the mongo shell, but this is what i get:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by prashant deva [ 12/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
also it seems the reason your script doesnt work is cause rs.status() results in the following:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by prashant deva [ 12/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
i am not sure how to run that query on a secondary. i tried using the mongoshell but got this:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramon Fernandez Marina [ 10/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Given the issues with diffindex.js can you please run:
for the database and collection affected by this issue? Please run it on all nodes and post the output. Please also post full logs as requested above. Thanks, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by prashant deva [ 10/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
please can we get a reply on this issue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by prashant deva [ 07/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
can you please recommend what to do. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by prashant deva [ 06/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ok this is what i get now:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramon Fernandez Marina [ 06/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
You can use mongo --port <number> to specify the port your mongod is running on. If it's 27000, can you please run
and post the output? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by prashant deva [ 06/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
this is what i get:
i think its cause this instance is deployed using mms service and is using port 27000 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramon Fernandez Marina [ 05/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
You can run it on any node, and it's safe to run it in a production system. If you have any concerns then please run it against one of your secondaries. Thanks, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by prashant deva [ 05/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The version is 2.6.8. Do I run it on a primary or secondary? – | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramon Fernandez Marina [ 05/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
pdeva, can you please run the attached diffindexes.js script on your system and post the resulting output?
Thanks, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramon Fernandez Marina [ 05/Mar/15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
pdeva, what version of MongoDB are you using? Also, can you please upload the logs of the former and the new primary nodes? Thanks, |