[SERVER-4680] Inconsistent query results on large data and result sets Created: 14/Jan/12 Updated: 04/Feb/15 Resolved: 07/Aug/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.0.1, 2.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kay Agahd | Assignee: | Randolph Tan |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | query | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu lucid (10.4) 64 Bit |
||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
Iterating through a large record set stops before all documents were fetched, even when a small batchSize is used and the returned documents are tiny. |
| Comments |
| Comment by Kay Agahd [ 08/Aug/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
I tested again on mongodb-linux-x86_64-2.2.0-rc0. Both test cases above passed this time, so we will update our production servers as soon as v2.2.0 is released. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kay Agahd [ 23/May/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Yes, I can reproduce it as well in v2.1.1 | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Greg Studer [ 22/May/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Hmm - does this also occur in 2.1 for you? Also, if you turn your logLevel up to 2, are there any version errors reported in mongod? The test case is easy to try on my system too, but just to verify. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kay Agahd [ 22/May/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Have a look at this. Without sleep, it returns all documents. When sleeping only 2 ms per doc, it stops already after 261000 docs even though batch size is very small (500). ,{_id:1}).batchSize(500); 261000 ) | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kay Agahd [ 22/May/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
This bug still persists in v2.0.5. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by auto [ 20/Apr/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'login': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}Message: | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by auto [ 20/Apr/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'login': u'gregstuder', u'email': u'greg@10gen.com', u'name': u'Greg Studer'}Message: Revert " This reverts commit e50b2e242875405f2b52d8757139961243b21b78. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by auto [ 20/Apr/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'login': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}Message: | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 19/Mar/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Its marked backport: yes, which means we will try based on safety of patch. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Y. Wayne Huang [ 19/Mar/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
+1 for 2.0 backport | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Benedikt Waldvogel [ 19/Mar/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Greg’s patch also fixes | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kay Agahd [ 26/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Ok, thank you Antoine, I understand. > Are you still seeing any issue on your side related to timeout? Yes, I can reproduce it at any time with the test case I've sent you (https://jira.mongodb.org/browse/SUPPORT-202). | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Antoine Girbal [ 25/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
sorry my previous comment only applied to the default behavior:
Are you still seeing any issue on your side related to timeout? | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kay Agahd [ 25/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
> client must consume 4MB within 10min, that is by design. When this is "by design" then batchSize is misleading, because you couldn't simply decrement batchSize to avoid connection timeouts. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Antoine Girbal [ 25/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
client must consume 4MB within 10min, that is by design. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Antoine Girbal [ 25/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
From testing it seems that mongos grabs about 4MB of doc from shard. Problem of this approach is that for smaller docs the timeout will be lower. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Antoine Girbal [ 24/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
It seems there is still an issue related to timeout.
the test is pulling about 100 docs per minute. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Greg Studer [ 20/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Feel free to reopen if you continue to see the problem. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Greg Studer [ 18/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Believe this should fix the issue - our batch logic with sharded cursors hadn't been touched in a long time. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by auto [ 18/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'login': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}Message: | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kay Agahd [ 17/Jan/12 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
I created a private JIRA having attached a dumped collection, so you can easily reproduce and hopefully track down the issue: |