[SERVER-72060] Tenant information on IDL command field is dropped off while parsing from BSONObj Created: 13/Dec/22  Updated: 29/Oct/23  Resolved: 13/Dec/22

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

Type: Bug Priority: Major - P3
Reporter: Sophia Tan Assignee: Sophia Tan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Server Serverless 2022-12-26
Participants:
Story Points: 1

 Description   

Here is an example of IDL generated command for renameCollection which has a namespacestring command parametet. The generated code drops off the tenant id.

 {      // skip correct codes.
        if (MONGO_likely(ctxt.checkAndAssertType(commandElement, String))) {
            _commandParameter = NamespaceStringUtil::deserialize(boost::optional<mongo::TenantId>{}, commandElement.valueStringData());
        }
        else {
            ctxt.throwMissingField(kCommandParameterFieldName);
        }
}

Actually, "NamespaceStringUtil::deserialize(ctxt.getTenantId(), commandElement.valueStringData())" is expected.



 Comments   
Comment by Githook User [ 13/Dec/22 ]

Author:

{'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}

Message: SERVER-72060 Tenant information on IDL command field is dropped off while parsing from BSONObj
Branch: master
https://github.com/mongodb/mongo/commit/94ba419ca53db9f7aa4926a604306a3f66b98c31

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