[SERVER-44383] Use trivial BSON conversion for sort key generation Created: 01/Nov/19  Updated: 29/Oct/23  Resolved: 04/Nov/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Improvement Priority: Major - P3
Reporter: Justin Seyster Assignee: Justin Seyster
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from SERVER-29104 Make sort key generation faster Closed
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Query 2019-11-18
Participants:
Linked BF Score: 0

 Description   

The SortKeyGenerator uses 'documentToBsonWithSortPaths()' to convert a Document to a BSONObj for the key generation slow path. In many cases, though, no conversion is necessary, and it's faster just to use the BSON that already exists within the Document.

This change adds a function to perform this "trivial" conversion from Document to BSON when possible.



 Comments   
Comment by Githook User [ 02/Nov/19 ]

Author:

{'name': 'Justin Seyster', 'username': 'jseyster', 'email': 'justin.seyster@mongodb.com'}

Message: SERVER-44383 Use trivial BSON conversion for sort key generation
Branch: master
https://github.com/mongodb/mongo/commit/18ae8ffc431b1dcdf72c9cf3ee07323b916bf16e

Generated at Thu Feb 08 05:05:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.