[SERVER-61042] $_internalUnpackBucket can swap with $sort without checking for top-k Created: 27/Oct/21 Updated: 29/Oct/23 Resolved: 08/Nov/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matt Boros | Assignee: | Katherine Wu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | quick-tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Participants: |
| Description |
|
Under certain conditions doOptimizeAt in _internalUnpackBucket will swap with a sort without checking if the sort has an internal limit. Since we optimize the pipeline from left to right, this does not cause any issues. However it's possible this could cause a bug in the future where we provide more results to the user than expected by accidentally pushing the limit back. |
| Comments |
| Comment by Githook User [ 08/Nov/21 ] |
|
Author: {'name': 'Katherine Wu', 'email': 'katherine.wu@mongodb.com', 'username': 'kaywux'}Message: |