[SERVER-47476] Make it possible to store a few elements in MultikeyComponents and MultikeyPaths without having to allocate memory Created: 10/Apr/20  Updated: 29/Oct/23  Resolved: 20/Apr/20

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

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

Issue Links:
Depends
Documented
is documented by DOCS-13604 Investigate changes in SERVER-47476: ... Closed
Related
is related to SERVER-47001 Reduce number of small buffer allocat... Closed
Backwards Compatibility: Minor Change
Sprint: Execution Team 2020-04-20, Execution Team 2020-05-04
Participants:

 Description   

We can take advantage of the fact that compound indexes with many fields and dotted paths with many parts are uncommon.

Optimize for the common cases.



 Comments   
Comment by Henrik Edin [ 28/Apr/20 ]

jmikola I wasn't sure of the impact so I clicked all the buttons. Sounds like it doesn't affect you, just wanted to be on the safe side.

Comment by Jeremy Mikola [ 28/Apr/20 ]

henrik.edin: Can you elaborate on how this change may affect drivers (re: DRIVERS-1202)? If I understand correctly, the commit is reducing the allowed limit for the maxBSONDepth server parameter, so I wouldn't expect any impact on drivers if they currently do not impose any limits on the creation of BSON documents today. I don't believe any drivers have limits for decoding, but if so, I don't expect that a more conservative limit on the server would not pose any problem.

On a separate note, I didn't find maxBSONDepth documented as a server parameter, and Nested Depth for BSON Documents documents a fix limit of 100 with no mention of this being configurable. Do you suppose that would warrant a documentation ticket?

Comment by Githook User [ 20/Apr/20 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-47476 Use small_vector to be able to store a few multikey components without allocating memory

Also cleaned up FieldRef
Branch: master
https://github.com/mongodb/mongo/commit/fccca7a804efdaf008ba859ceeb09d62444b2738

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