[SERVER-63279] Pushing predicates on the time-series metaField past unpacking can cause incorrect results Created: 03/Feb/22 Updated: 29/Oct/23 Resolved: 11/Feb/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.2.0, 5.0.5 |
| Fix Version/s: | 5.3.0, 5.0.7, 5.2.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dan Larkin-York | 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: |
v5.2, v5.0
|
||||||||
| Sprint: | QO 2022-02-07, QO 2022-02-21 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 168 | ||||||||
| Description |
|
We attempt to push predicates on the time-series metaField past the $_internalUnpackBucket stage so we can avoid unpacking buckets when possible. However, we may inadvertently push the predicate past another stage which may alter the document contents (e.g. $project) which can affect whether the document satisfies the predicate. For example:
If we evaluate the predicate at the bucket level, we may get results, while if we evaluate after unpacking, we'll get an empty result set. |
| Comments |
| Comment by Githook User [ 25/Feb/22 ] |
|
Author: {'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}Message: |
| Comment by Githook User [ 16/Feb/22 ] |
|
Author: {'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}Message: |
| Comment by Githook User [ 11/Feb/22 ] |
|
Author: {'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}Message: |
| Comment by Githook User [ 11/Feb/22 ] |
|
Author: {'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}Message: |