[SERVER-4848] limit() is returning less than it should at sharded collection Created: 02/Feb/12 Updated: 11/Jul/16 Resolved: 10/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding, Shell |
| Affects Version/s: | 1.8.3, 2.0.2 |
| Fix Version/s: | 2.0.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | HAMADA Ran | Assignee: | Greg Studer |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
CentOS 5.7 (64bit) |
||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
I tried query to sharded collection with limit() method at mongo shell, and sometimes got less documents than it should. Test code (attached below):
and result :
I tried same test via mondod(shard) directly and it's OK. I tried same test with Perl driver (MongoDB 0.45 CPAN module) and it's OK. (test code and result attached) |
| Comments |
| Comment by Greg Studer [ 10/Jan/13 ] |
|
Attached a slightly easier-to-run version of the script. Later versions of 2.0, 2.2, and 2.4 no longer manifest this error, so marking as fixed. |
| Comment by Greg Studer [ 28/Jun/12 ] |
|
Unclear - there were some changes backported, more likely in later 2.0.x versions. However, hamada's test case (test.js) makes it very simple to run on your own mongo installation - we're still working on this. |
| Comment by Shirish Reddy P [ 28/Jun/12 ] |
|
Does this affect 2.0.4 too ? |
| Comment by Greg Studer [ 12/Apr/12 ] |
|
I can repro in 2.0.2 - not in 2.1.1 - this may be related to some getMore changes that got pushed a few weeks ago. Will follow up. |
| Comment by HAMADA Ran [ 02/Feb/12 ] |
|
I had attached 2 files. There are the same test using Java driver 2.7.2, and has same problem as mongo shell (JavaScript) does. |
| Comment by HAMADA Ran [ 02/Feb/12 ] |
|
Same test using Java Driver 2.7.2 |