[SERVER-65920] Remove NamespaceString ctors with default parameter for tenantId Created: 25/Apr/22  Updated: 29/Oct/23  Resolved: 02/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: Janna Golden 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
depends on SERVER-77689 Remove use of NamespaceString ctors w... Closed
depends on SERVER-78926 Replace calls to deprecated Namespace... Closed
depends on SERVER-78928 Create constant NamespaceString inste... Closed
depends on SERVER-79313 Remove NamespaceStringOrUUID ctors wi... Closed
is depended on by SERVER-65456 Make NamespaceString::db_deprecated()... Closed
Duplicate
duplicates SERVER-76853 Avoid recreating a NamespaceString ob... Closed
Related
is related to SERVER-78942 Replace `forTest` calls in NamespaceS... Closed
Assigned Teams:
Serverless
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-06-12, Server Serverless 2023-06-26, Server Serverless 2023-07-10, Server Serverless 2023-07-24, Server Serverless 2023-08-07
Participants:
Story Points: 3

 Description   

Remove the NamespaceString ctors that take a default parameter. At the point we do this ticket, most (hopefully all!) places that need a tenantId should already be passed one. If there are any places that don't take in a TenantId explicitly yet, we'll need to decide whether we should pass boost::none explicitly, or whether there is an actual tenantId that should be passed.

Any unit tests can take in boost::none (unless they test multitenancy). If there are any places where an explicit tenantId should be passed that we haven't changed yet, we can change this as a part of this ticket if the tenantId we want to pass is available easily. If there is work to be done to thread the tenantId through, we should file a separate ticket to do that work, pass boost::none at the callsite, and leave a TODO on the filed ticket.



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

Author:

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

Message: SERVER-65920 Remove NamespaceString ctors with default parameter for tenantId
Branch: minh.luu-no_compile_sys-perf
https://github.com/mongodb/mongo/commit/7ab8709b6bcaac12f8f8951e03ac781f6b7ee6d3

Comment by Githook User [ 02/Aug/23 ]

Author:

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

Message: SERVER-65920 Remove NamespaceString ctors with default parameter for tenantId
Branch: master
https://github.com/mongodb/mongo/commit/7ab8709b6bcaac12f8f8951e03ac781f6b7ee6d3

Comment by Githook User [ 17/Jul/23 ]

Author:

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

Message: SERVER-65920 Remove NamespaceString ctors with default parameter for tenantId - test
Branch: master
https://github.com/mongodb/mongo/commit/7ea1fe31cdcf9f7cc146715ac72891bcb7e31311

Comment by Githook User [ 10/Jul/23 ]

Author:

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

Message: SERVER-65920 Remove NamespaceString ctors with default parameter for tenantid
Branch: master
https://github.com/mongodb/mongo/commit/356e3ba0eb032202cb5569341025094078d692ac

Comment by Sophia Tan [ 28/Mar/23 ]

There are some call sites that have no DatabaseName object of NamespaceString object to pass through tenant id:

  • db cloner. It depends on "SERVER-63111 Use DatabaseName in the Cloner". Before SERVER-63111, we can create a DatabaseName object with DatabaseNameUtill::deserialize.
  • script engine. Serverless does not support server side scripting today. Perhaps, we will use "boost::none" explicitly.
Generated at Thu Feb 08 06:04:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.