[JAVA-950] Wrong fetching with limit 1 on sharded environment Created: 20/Sep/13 Updated: 11/Dec/13 Resolved: 11/Dec/13 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | 2.11.2, 2.11.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | siarhei usau | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 6 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Win 7 64-bit |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
1. Create three Mongo shards on local host. You can use attached file create_local_shards.sh. Be sure all shards are created successfully: MongoDB shell version: 2.4.3 2. Run main.java.sharding.test.Starter#main metod of TestOfSkipLimitFetching standalone app. On mine machine I see the range of empty responses for following skip-limits: Skip 4000, Limit 1 Full log you can find in attach. So as you see limit of one doc works well on small skip values (till 3000). Then from 4000 of skipped docs we faced with this issue - collection.find().skip(>=4000).limit(1) returns nothing. NOTE: We can reproduce it only on sharded Mongo environment. Actually such behavior we reproduced on more than one machines (Unix and Win) with local shards and distributed between 12 different hosts. |
| Comments |
| Comment by Jeffrey Yemin [ 11/Dec/13 ] |
|
Closing this, as it's not a Java driver bug. The driver is correctly setting numberToReturn to -1, and mongos is not returning a document, as it does when numberToReturn is 1. |
| Comment by Jeffrey Yemin [ 11/Dec/13 ] |
|
I'm linking this to |
| Comment by siarhei usau [ 05/Dec/13 ] |
|
db version: v2.4.3 & v2.4.5 |
| Comment by Jeffrey Yemin [ 04/Dec/13 ] |
|
Siarhei, Can you respond to Jesse's question, please, so we can move this issue along? Jeff |
| Comment by A. Jesse Jiryu Davis [ 21/Nov/13 ] |
|
What versions of mongos and mongod are you running, please? |
| Comment by siarhei usau [ 20/Sep/13 ] |
|
What TestOfSkipLimitFetching standalone app does: |