[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: |