[SERVER-65456] Make NamespaceString::db_deprecated() private Created: 11/Apr/22 Updated: 29/Oct/23 Resolved: 08/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Janna Golden | Assignee: | Mathis Bessa |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | ntdi_must_have | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Serverless
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Server Serverless 2023-05-15, Server Serverless 2023-07-10, Server Serverless 2023-08-07, Server Serverless 2023-08-21, Server Serverless 2023-09-04, Server Serverless 2023-09-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Story Points: | 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
In this ticket, we will go through all the call sites of "NamespaceString::db()" to make it call "NamespaceString::dbName()" so that the tenant information will not be dropped. If a call site does not accept DatabaseName object, we should change the function to take in DatabaseName first. |
| Comments |
| Comment by Githook User [ 07/Sep/23 ] |
|
Author: {'name': 'Mathis Bessa', 'email': 'mathis.bessa@mongodb.com', 'username': 'mathisbessamdb'}Message: |
| Comment by Mathis Bessa [ 31/Aug/23 ] |
|
I have created a new PR for this : |
| Comment by Sophia Tan [ 08/May/23 ] |
|
mathis.bessa@mongodb.com henrik.edin@mongodb.com Two reasons that we are going to keep "NamespaceString::dbName()" as it was:
|
| Comment by Matt Broadstone [ 18/Apr/23 ] |
|
From the review on |
| Comment by Janna Golden [ 18/Jan/23 ] |
|
Yeah, that's a good idea. We will also be removing the DatabaseName constructors that provide a default for tenantId, so strings should not be able to be implicitly converted to DatabaseName objects as well, which should help with this as well! Ty for the suggestion dianna.hohensee@mongodb.com. |
| Comment by Dianna Hohensee (Inactive) [ 18/Jan/23 ] |
|
An additional suggestion: might we mark the DatabaseName constructor explicit? That would prevent the situation where a function Foo takes a DatabaseName as a parameter, and a caller passes in a string that Foo implicitly turns from a string into a DatabaseName instance. Here's an example of what I mean precisely. For motivation, I recently had trouble debugging one of my patches because I mistakenly passed NamespaceString::db() instead of NamespaceString::dbName() into this function. This ticket removes NamespaceString::db(), but perhaps there are / will be other ways to inadvertently pass strings. |