[SERVER-9819] Potential problem with mongodb upgrade from 2.2.2 to 2.4.3 Created: 30/May/13 Updated: 17/Aug/13 Resolved: 31/May/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Zeki Mokhtarzada | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
When I upgraded a secondary node from mongo 2.2.2 to 2.4.3, I get the following error when I connect from the command line: Server has startup warnings: , unique: true, ns: "web_qa.sites", name: "siteId_1" } claims to be of type 'siteId', which is either invalid or did not exist before v2.4. See the upgrade section: http://dochub.mongodb.org/core/upgrade-2.4 This is just a standard index. I've tried deleting and recreating the index but that did not help. Does anyone have any suggestions? |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 31/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
No problem; sometimes a second set of eyes is all that is needed. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zeki Mokhtarzada [ 31/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Well now I just feel silly. I removed the index from the primary, restarted the upgraded secondary and it came up without any errors. Thank you so much! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 31/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
No s in the database name. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zeki Mokhtarzada [ 31/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yep. Just executed the following:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 31/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Did you restart after removing the index? The startup warnngs are created You can do a full resync from no data but that is not needed. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zeki Mokhtarzada [ 31/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here is a complete dialog including the error message and the indexes on the sites collection:
I have considered blowing away the data directory and resyncing. That would be ok for my case, but may not be ok for other users. Is it safe for a 2.4.3 secondary to rebuild off of a 2.2.2 primary? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 30/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Can you post the new error message? Also, make sure you do "use web_qa" to get to the correct database first. Here is code to show all the indexes in the db. You can run this on each replica if you want.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zeki Mokhtarzada [ 30/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
FYI, I have not upgraded the primary yet. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zeki Mokhtarzada [ 30/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hmm... The strange thing is that after removing the index on the primary and bouncing the upgraded secondary, I still get the same error. Is it possible there is a phantom index somewhere in the catalog or something? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 30/May/13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The problem with this index is that the word "siteId" is where there should be one of the following : 1/-1/hashed/text/2d/<etc> in the index specification. This is not a valid index specification now that more error checking is done. You can remedy this situation by removing the index, and creating a valid one with the number 1 (for ascending) as described in the docs: http://docs.mongodb.org/manual/tutorial/create-an-index/ If you expect you created an index on the name field this would be what you want to run:
Or if you wanted a compound index on name + siteId then this is what you want:
|