[SERVER-67826] Ensure parsed IDL types own or preserve the lifetime of their data Created: 06/Jul/22  Updated: 29/Oct/23  Resolved: 27/Sep/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Task Priority: Major - P3
Reporter: George Wangensteen Assignee: George Wangensteen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-68767 Make remote command runner use owning... Closed
Problem/Incident
Related
related to SERVER-74017 Make IDL _anchorObj field and setter ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2022-08-08, Service Arch 2022-10-03
Participants:
Linked BF Score: 135

 Description   

Some IDL types contain fields that are of type BSONObj. When we parse these types from BSON, those fields are references into the BSON we are parsing from, which can become a problem if the parsed IDL type outlives the BSON we are parsing from. The IDL has an "object owned" type to indicate that the parsed fields must own the underlying data, but not all IDL command reply types use this today.We need to investigate a solution, possibly but not necessarily involving converting reply types to use object_owned, to ensure that parsed reply types own their own data/can safely outlive the BSON they were parsed from.



 Comments   
Comment by Githook User [ 26/Sep/22 ]

Author:

{'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com', 'username': 'gewa24'}

Message: SERVER-67826 Allow IDL types to own or preserve the lifetime of underlying data
Branch: master
https://github.com/mongodb/mongo/commit/ed0dffba9cb908bb22c21d3d79f6434e25fa8947

Comment by Githook User [ 02/Aug/22 ]

Author:

{'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com', 'username': 'gewa24'}

Message: SERVER-67826 Ensure parsed IDL types own or preserve the lifetime of their data
Branch: master
https://github.com/mongodb/mongo/commit/de251a83a41566723a895bf1106c66d9f19d1540

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