[SERVER-74302] issues with GROUP_BY stage in aggregation (6.2.0) Created: 23/Feb/23 Updated: 27/Oct/23 Resolved: 17/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | John Anderson | Assignee: | Milena Ivanova |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Optimization
|
|||||||||||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | example data:
Execute pipeline:
Expected Result:
|
|||||||||||||||||||||||||||||||||||
| Sprint: | QO 2023-04-03 | |||||||||||||||||||||||||||||||||||
| Participants: |
| Description |
|
I have pipelines that previously worked but no longer do since upgrading to 6.2.0. They all specifically have a GROUP_BY stage that is no longer working as expected. e.g.
In the above example I was previously getting the following result
Since updating to version 6.2.0 I am getting:
Note: these pipelines are being run against a timeseries collection |
| Comments |
| Comment by Milena Ivanova [ 17/Mar/23 ] | |||||||
|
The issue was fixed in revision 6.2.1 | |||||||
| Comment by Milena Ivanova [ 17/Mar/23 ] | |||||||
|
I can confirm, that the bug exists in 6.2.0-rc0
It is fixed in MongoDB server version: 6.2.1
There were a number of tickets last year touching the optimization of $group over timeseries, I am not sure when exactly it was introduced. After the following commit, the aggregation works correctly.
An update to the latest 6.2 revision should fix the issue.
|