-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 7.1.0-rc0
-
Labels:
Previously there was no error thrown by the server when a user would send a BSON object with a sort order that contained a field twice. This ticket introduces a new validation rule to ensure we have only valid sort order (e.g. only having the field in there once). This is ONLY for users that would submit a BSON object directly. If a JSON based interface is used there is no change in behavior as the JSON libraries already deduplicate the field.
Description of Linked Ticket
The SortPattern constructors do not check for duplicate paths being in the sort pattern, e.g.
{a:1, b:1, a:1}. This is something we should check for and disallow. There may be existing places in our codebase where a sort pattern with duplicate field names are created by accident.
- documents
-
SERVER-74725 Query SortPattern does not check for duplicate fields
- Closed