[SERVER-70160] Do not push down $match that needs whole document before $internalUnpackBucket Created: 03/Oct/22 Updated: 29/Oct/23 Resolved: 05/Oct/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.0.13 |
| Fix Version/s: | 5.0.14 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Milena Ivanova | Assignee: | Milena Ivanova |
| 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 | ||||
| Participants: | |||||
| Linked BF Score: | 135 | ||||
| Description |
|
The aggregation with a single $match stage over timeseries
is incorrectly pushed before the internalUnpackBucket stage and evaluated to an empty document set. This happens in DocumentSource::PushMatchBefore() function where the analysis misses the fact that the $match stage needs the entire document. https://github.com/mongodb/mongo/blob/v5.0/src/mongo/db/pipeline/document_source.cpp#L199 |
| Comments |
| Comment by Githook User [ 05/Oct/22 ] |
|
Author: {'name': 'Milena Ivanova', 'email': 'milena.ivanova@mongodb.com', 'username': 'mivanova3'}Message: |