[SERVER-67780] Incorrect $group rewrite for timeseries collection when the accumulator uses meta field Created: 05/Jul/22 Updated: 29/Oct/23 Resolved: 31/Aug/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.0.9, 6.0.0-rc13, 6.1.0-rc0 |
| Fix Version/s: | 6.2.0-rc0, 5.0.16, 6.0.6 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Arun Banala | Assignee: | Svilen Mihaylov (Inactive) |
| 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, v5.0
|
||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||
| Sprint: | QO 2022-08-08, QO 2022-08-22, QO 2022-09-05 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 157 | ||||||||||||||||||||||||
| Description |
|
We currently have an optimisation to rewrite a $group with the group key on meta field, and the accumulator(s) using either $min or $max on measurements. This logic is incorrectly assuming that all non-timeField paths can be treated as measurements. We rewrite a path "$x" as either "$control.min.x" or "$control.max.x". This rewrite would be incorrect when the accumulator is using a metaField. In this case, the rewrite logic should be a path "$metaField.x" gets written into "$meta.x". |
| Comments |
| Comment by Githook User [ 17/Mar/23 ] |
|
Author: {'name': 'Svilen Mihaylov', 'email': 'svilen.mihaylov@mongodb.com', 'username': 'svilen-mihaylov'}Message: |
| Comment by Githook User [ 15/Mar/23 ] |
|
Author: {'name': 'Svilen Mihaylov', 'email': 'svilen.mihaylov@mongodb.com', 'username': 'svilen-mihaylov'}Message: |
| Comment by Githook User [ 30/Aug/22 ] |
|
Author: {'name': 'Svilen Mihaylov', 'email': 'svilen.mihaylov@mongodb.com', 'username': 'smihaylov-mongodb'}Message: |
| Comment by Githook User [ 30/Aug/22 ] |
|
Author: {'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com'}Message: Revert " This reverts commit ccb0d93033900be8cead29d3cdd414d8a85f2b03. |
| Comment by Githook User [ 29/Aug/22 ] |
|
Author: {'name': 'Svilen Mihaylov', 'email': 'svilen.mihaylov@mongodb.com', 'username': 'smihaylov-mongodb'}Message: |
| Comment by Githook User [ 26/Aug/22 ] |
|
Author: {'name': 'liubov.molchanova', 'email': 'liubov.molchanova@mongodb.com', 'username': 'liubov-molchanova'}Message: Revert " This reverts commit 3ae43985776cf6de9cff18775e4484b9c6904e3e. |
| Comment by Githook User [ 25/Aug/22 ] |
|
Author: {'name': 'Svilen Mihaylov', 'email': 'svilen.mihaylov@mongodb.com', 'username': 'smihaylov-mongodb'}Message: |
| Comment by Rushan Chen [ 11/Jul/22 ] |
|
This is currently in the QO queue joseph.kanaan@mongodb.com |