[SERVER-81119] Remove BSONObj anchors from IDL generated types that do not need it Created: 15/Sep/23  Updated: 07/Feb/24

Status: In Code Review
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Alex Li
Resolution: Unresolved Votes: 0
Labels: perf-8.0, perf-tiger, perf-tiger-handoff, perf-tiger-q4, perf-tiger-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-86176 Add support for new required fields i... Needs Scheduling
Assigned Teams:
Service Arch
Sprint: Service Arch 2023-11-13, Service Arch 2023-11-27, Service Arch 2023-12-11, Service Arch 2023-12-25, Service Arch 2024-01-08, Service Arch 2024-01-22, Service Arch 2024-02-05, Service Arch 2024-02-19
Participants:

 Description   

In SERVER-67826, a BSONObj anchor was added to every IDL generated type. This feature was added to ensure callers could avoid the need to deep copy BSONObj types and other view types.

This BSONObj increases the size of every generated IDL type and sometimes is not needed. For instance, if a IDL generated type only consists of scalars, then the BSONObj is unnecessary. The generated API can remain same but for IDL generated types that do not benefit from this, it should be omitted from the generated C++ class. For instance OpLog has 5 of these anchors and several can be removed safely.



 Comments   
Comment by Githook User [ 03/Feb/24 ]

Author:

{'name': 'Alex Li', 'email': '98560274+lia394126@users.noreply.github.com', 'username': 'lia394126'}

Message: SERVER-81119 Add support for is_view field in IDL types (#18623)

GitOrigin-RevId: f283bbeb8710a57d68d1acf457fd4aa5c61dd0aa
Branch: master
https://github.com/mongodb/mongo/commit/915b84c819da0e4c3cf38e77f9d8c2bac4cf7262

Generated at Thu Feb 08 06:45:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.