[SERVER-78395] Do not call deprecated NamespaceString::db() in sharding code Created: 23/Jun/23  Updated: 29/Oct/23  Resolved: 18/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: Sophia Tan Assignee: Didier Nadeau
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-65456 Make NamespaceString::db_deprecated()... Closed
Assigned Teams:
Serverless
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-07-24
Participants:
Story Points: 1

 Description   

As we are making NamespaceString::db() private, we should not call this function in sharding code.
For serialization db of nss, we should call serialize function of Util class.
For check if a db name is admin/config/local, we'd better to call `isAdminDb()`, `isConfigDb()` etc.
For compare tenant db names, we'd better to compare the DatabaseName objects.



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

Author:

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

Message: SERVER-78395 Remove NamespaceString::db() for sharding code
Branch: master
https://github.com/mongodb/mongo/commit/60d2d4251c223caddc27d114e40f704a904b4feb

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