[SERVER-16126] find cursor don't return documents but count() does Created: 13/Nov/14 Updated: 15/Jan/15 Resolved: 15/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.6.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Myoungki Kim | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: | Some document updates in sharded collection. db.collection.find({ng:{$exists:false}}).count() |
| Participants: |
| Description |
|
I ran following queries but it returns strange values. This makes inconsistency in the result. |
| Comments |
| Comment by Ramon Fernandez Marina [ 15/Jan/15 ] | |
|
mkim, since this is the expected behavior when using count() against a mongos I'm going to close this ticket. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. Regards, | |
| Comment by Myoungki Kim [ 14/Nov/14 ] | |
|
The query ran on mongos. I have searched similar issues and found that it is because there are some shards which has 'nChunkSkips' values. If this is the cause of this problem, how can I check the migration has been finished or not ? Is there any collection which has this information ? { | |
| Comment by Ramon Fernandez Marina [ 13/Nov/14 ] | |
|
mkim, what are you running that query against? A mongos? A primary? A secondary? Also, how many documents are you expecting to match the query? Note that when run against a mongos, count() may return incorrect results. Can you send us the output of:
? |