[SERVER-32430] DocumentSourceSort sorts array documents incorrectly if there is a non-simple collation Created: 20/Dec/17 Updated: 30/Oct/23 Resolved: 22/Dec/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 3.6.1 |
| Fix Version/s: | 3.6.2, 3.7.1 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Kyle Suarez | Assignee: | Kyle Suarez |
| 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: |
v3.6, v3.4
|
||||||||||||||||||||
| Steps To Reproduce: |
The document with x: ["b", "c"] is obviously incorrectly sorted. The find command gets the sort order correctly:
|
||||||||||||||||||||
| Sprint: | Query 2018-01-01 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Let's say we are performing an in-memory sort with the $sort aggregation stage, and the sort involves a non-simple collation. This is what happens in DocumentSourceSort:
|
| Comments |
| Comment by Kyle Suarez [ 29/Jan/18 ] |
|
Filed and linked |
| Comment by Kelsey Schubert [ 29/Jan/18 ] |
|
New ticket, please. |
| Comment by Kyle Suarez [ 29/Jan/18 ] |
|
Oops. Is it possible to still throw in a commit under this ticket or should we just file a new one? |
| Comment by Charlie Swanson [ 26/Jan/18 ] |
|
Looks like we forgot to remove this when we linked |
| Comment by Githook User [ 02/Jan/18 ] |
|
Author: {'name': 'Kyle Suarez', 'username': 'ksuarz', 'email': 'kyle.suarez@mongodb.com'}Message: (cherry picked from commit 79352e71b697cb8c126510095bba7fd816128701) |
| Comment by Githook User [ 22/Dec/17 ] |
|
Author: {'name': 'Kyle Suarez', 'email': 'kyle.suarez@mongodb.com', 'username': 'ksuarz'}Message: |
| Comment by Kyle Suarez [ 20/Dec/17 ] |
|
I'm marking this as 3.6 Required because it's a query correctness bug. |