[SERVER-75733] Clarify lifetime guarantees of NamespaceString::ns and DatabaseName::db Created: 05/Apr/23 Updated: 29/Oct/23 Resolved: 15/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 7.0.0-rc1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Broadstone | Assignee: | Matt Broadstone |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v7.0
|
||||
| Sprint: | Server Serverless 2023-04-17 | ||||
| Participants: | |||||
| Description |
|
NamespaceString::ns and DatabaseName::db both return const std::string& to their own std::string storage. This leads to difficult-to-maintain code because the lifetime of the returned value is unclear: sometimes it results in a copy, other times it remains a const-ref. With the upcoming changes in |
| Comments |
| Comment by Githook User [ 02/May/23 ] |
|
Author: {'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}Message: (cherry picked from commit 3e76161bc537343aa585b305c068b1910578c07f) |
| Comment by Githook User [ 14/Apr/23 ] |
|
Author: {'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}Message: |