[SERVER-14039] $nearSphere query with 2d index, skip, and limit returns incomplete results Created: 23/May/14 Updated: 02/Feb/15 Resolved: 24/Jul/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 2.6.3, 2.7.0 |
| Fix Version/s: | 2.6.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Siyuan Zhou |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
Issue Status as of Aug 6, 2014 ISSUE SUMMARY USER IMPACT WORKAROUNDS AFFECTED VERSIONS FIX VERSION RESOLUTION DETAILS Original descriptionA $nearSphere query with a 2d index, a skip, and a limit returns one less result than expected. If the limit is 1, then zero results are returned. Same thing happens if the limit is negative. Not observed with 2dsphere index. Discovered by Stefan Wójcik while adding geo tests to PyMongo. |
| Comments |
| Comment by Thomas Rueckstiess [ 24/Jul/14 ] | |||||||||||||
|
Hi hostirosti, As you may have noticed, we were able to fix this bug quicker than expected and managed to get it into the 2.6.4 release, which will likely be early August. Regards, | |||||||||||||
| Comment by Githook User [ 24/Jul/14 ] | |||||||||||||
|
Author: {u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}Message: | |||||||||||||
| Comment by Thomas Rueckstiess [ 23/Jul/14 ] | |||||||||||||
|
Hi Robert, We're currently evaluating whether this can be backported to 2.6, in which case we would add the fix to one of the upcoming 2.6.x releases. When we decided that it's feasible, we will add the appropriate Fix Version (e.g. 2.6.x) to the ticket. The earliest possible 2.6 version this can go into would be 2.6.5, which is about 6-8 weeks out, however we cannot guarantee that it will be in 2.6.5 at this stage. In the mean time, as a workaround you can change the limit to get the expected results. Replace your original limit with (limit + skip). For example, if you'd like .skip(5).limit(4), instead specify .skip(5).limit(9). I hope this workaround is suitable for you until a fix is available. Regards, | |||||||||||||
| Comment by Robert K. [ 23/Jul/14 ] | |||||||||||||
|
Is there an ETA when this will be fixed? | |||||||||||||
| Comment by Thomas Rueckstiess [ 08/Jul/14 ] | |||||||||||||
|
This only occurs with 2d indices, not with 2dsphere. Confirmed for both $near and $nearSphere. Versions up to 2.4.10 are not affected, seems to be a regression starting in 2.6.0. 2.4.10
2.6.0
2.6.3 is also still affected. |