[SERVER-69952] Filtering on dates outside of the 32 bit epoch range returns wrong results Created: 23/Sep/22 Updated: 29/Oct/23 Resolved: 01/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0, 5.0.16, 6.0.6, 6.3.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Joel Redman (Inactive) | Assignee: | David Percy |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | quick-tech-debt, time-series | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||
| Backport Requested: |
v6.3, v6.0, v5.0
|
||||||||||||||||||||||||||||||||
| Steps To Reproduce: | db.createCollection(timeColl, {timeseries: {timeField: time}}); , {[timeFieldName]: new Date("1975-01-01")}, {[timeFieldName]: new Date("1980-01-01")}, {[timeFieldName]: new Date("1995-01-01")}, {[timeFieldName]: new Date("2030-01-01")}]; , {time: new Date("1975-01-01")}, |
||||||||||||||||||||||||||||||||
| Sprint: | QO 2023-02-06, QO 2023-02-20, QO 2023-03-06 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Linked BF Score: | 166 | ||||||||||||||||||||||||||||||||
| Description |
|
Literals outside the 32 bit epoch are currently compared to _id, which has already been trimmed to 32 bits, so we cannot accurately match against them. This obvious fix is to determine whether the compared dates can be outside the epoch range and not relying on _id in that case. |
| Comments |
| Comment by Githook User [ 19/Apr/23 ] |
|
Author: {'name': 'Joel Redman', 'email': 'joel.redman@mongodb.com', 'username': 'joredman'}Message: |
| Comment by Githook User [ 22/Mar/23 ] |
|
Author: {'name': 'Joel Redman', 'email': 'joel.redman@mongodb.com', 'username': 'joredman'}Message: |
| Comment by Githook User [ 22/Mar/23 ] |
|
Author: {'name': 'Joel Redman', 'email': 'joel.redman@mongodb.com', 'username': 'joredman'}Message: |
| Comment by Githook User [ 01/Mar/23 ] |
|
Author: {'name': 'Joel Redman', 'email': 'joel.redman@mongodb.com', 'username': 'joredman'}Message: |
| Comment by Githook User [ 02/Dec/22 ] |
|
Author: {'name': 'dziana.hurynovich', 'email': 'dziana.hurynovich@mongodb.com'}Message: Revert " This reverts commit 362f7088aabd9e6f49e5f99525a0296723b3a9c3. |
| Comment by Githook User [ 01/Dec/22 ] |
|
Author: {'name': 'Joel Redman', 'email': 'joel.redman@mongodb.com', 'username': 'joredman'}Message: |