[SERVER-5763] The _id index broken Created: 04/May/12 Updated: 15/Aug/12 Resolved: 24/Jun/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.0.2, 2.0.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Andrew Orsich | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | index, query, windows | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 7, x64 |
||
| Operating System: | Windows |
| Participants: |
| Description |
|
Hey, I am trying to run following query:
This query suppose to return one document with id 2306, but it for some reason gives strange result:
It seems that something weird happens with default _id index, but I can't re-create it. Thank you. |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 07/May/12 ] | ||||||||||||||||||||||||||||||||||||||
|
Not sure either. Could be index corruption. Did you ever run without journaling or is this data from pre-2.0.x ? Were there any errors in the server logs when it gave the wrong results? | ||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Orsich [ 07/May/12 ] | ||||||||||||||||||||||||||||||||||||||
|
Here is explain before reindex:
After reindex it works.. And explain looks same:
Not sure what cause this issue. | ||||||||||||||||||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 05/May/12 ] | ||||||||||||||||||||||||||||||||||||||
|
Can you run db.items.find( {"_id": 2306}).explain() and post the results. Also, you should be able to run db.items.reIndex() to regenerate all indexes (even the _id one). http://www.mongodb.org/display/DOCS/Index-Related+Commands#Index-RelatedCommands-ReIndex If the results change after the reindex it would be good to see those explain results too. |