[SERVER-65406] Time series query plan results with 2dsphere index do not match collection scan Created: 08/Apr/22 Updated: 29/Oct/23 Resolved: 20/Apr/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc5, 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matt Boros | Assignee: | Dan Larkin-York |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v6.0
|
||||||||
| Sprint: | QO 2022-04-18, QO 2022-05-02 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 135 | ||||||||
| Description |
|
Having a 2dsphere index on a time series collection can leave out results. Note that it starts to fail at 1001 documents, and a bucket can hold 1000 documents at most.
|
| Comments |
| Comment by Githook User [ 06/May/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 20/Apr/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Percy [ 09/Apr/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Another observation: the insertion order affects whether the test passes:
This is surprising because the insertion order does not affect how the events are grouped into buckets (in this example). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Percy [ 08/Apr/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We were able to shrink the test data down to 4 documents:
Another strange observation: there are 2 buckets, with the same metadata value. The 'meta' field seems irrelevant to the query. But if you give them different meta values:
then the test passes. |