[SERVER-80101] getDBForReadMirroring to return a DatabaseName Created: 15/Aug/23  Updated: 29/Oct/23  Resolved: 16/Aug/23

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

Type: Task Priority: Major - P3
Reporter: Mathis Bessa Assignee: Mathis Bessa
Resolution: Fixed Votes: 0
Labels: ntdi_must_have
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-73658 RemoteCommandRequest to use DatabaseName Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-08-21
Participants:

 Description   

The method getDBForReadMirroring is passing a cmdObj that's provided from the `body` of the `request` that is parsed in the BasicCommandWithReplyBuilderInterface::Invocation.

That logic is odd and should be simplified.

We should see if we can simply return the _dbName directly since the cmdObj() parameter comes from the `request.body` which is used to create the DatabaseName internal member _dbName. 

Part of this change also include changing the return type from std::string to DatabaseName.



 Comments   
Comment by Githook User [ 16/Aug/23 ]

Author:

{'name': 'Mathis Bessa', 'email': 'mathis.bessa@mongodb.com', 'username': 'mathisbessamdb'}

Message: SERVER-80101 getDBForReadMirroring to return a DatabaseName
Branch: master
https://github.com/mongodb/mongo/commit/032ddbb7ab6cad79cfd01a9c909cf299dd48e9e7

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