[SERVER-61320] CollModRequest should own BSONObj for CollMod command request Created: 08/Nov/21  Updated: 29/Oct/23  Resolved: 10/Nov/21

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

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

Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-11-15
Participants:

 Description   

The CollMod command implementation parses and validates the IDL-derived type CollMod into a CollModRequest (with an embedded CollModIndexRequest). These structs contain multiple BSONElement fields that reference the BSONObj generated from the command request.

Since the cmdObj document is not explicitly referenced outside the CollModRequest and CollModIndexRequest structs, it would be logical in terms of scope and resource lifetime to transfer ownership of the cmdObj into the CollModRequest struct.



 Comments   
Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-61320 CollModRequest owns BSONObj generated from CollMod command request IDL
Branch: master
https://github.com/mongodb/mongo/commit/22fad2bc60c4af6d02c87401b2186efa5bb4b7c8

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