[SERVER-66887] Remove NamespaceStringOrUUID::dbname() Created: 31/May/22  Updated: 29/Oct/23  Resolved: 12/Jul/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: Janna Golden Assignee: Didier Nadeau
Resolution: Fixed Votes: 0
Labels: neweng, ntdi_must_have
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-67817 Change NamespaceStringOrUUID::db() to... Closed
Assigned Teams:
Serverless
Backwards Compatibility: Fully Compatible
Participants:
Story Points: 1

 Description   

NamespaceStringOrUUID::dbName() returns the dbName either that's on the NamespaceString or that's stored on NamespaceStringOrUUID itself. There isn't any need for NamespaceStringOrUUID::dbname(), and it's confusing to have so many methods that return the db name.

The function is only used in about 10 places, all of which can be converted to using db() instead. We'll need to change the code that generates the _dbName member for IDL defined command types here - we can just call NamespaceStringOrUUID::db().toString() here as well, the code that exists currently is essentially the same behavior as NamespaceStringOrUUID::db().



 Comments   
Comment by Githook User [ 12/Jul/23 ]

Author:

{'name': 'Didier Nadeau', 'email': 'didier.nadeau@mongodb.com', 'username': 'nadeaudi'}

Message: SERVER-66887 Remove NamespaceStringOrUUID::dbname()
Branch: master
https://github.com/mongodb/mongo/commit/fc1994df24b402b45b5466e2a55e0910c604d1d2

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