[SERVER-55180] Remove StringData <=> std::string_view implicit conversions Created: 13/Mar/21  Updated: 29/Oct/23  Resolved: 21/Mar/21

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-48470 Use StringData instead of std::string... Closed
Problem/Incident
is caused by SERVER-51266 Add support for BSONType::RegEx in SBE Closed
is caused by SERVER-53399 Implement registration and basic pars... Closed
Related
related to SERVER-55381 StringData find and rfind incorrect r... Closed
is related to SERVER-43583 StringData should get most or all str... Backlog
is related to SERVER-32422 convert StringData to std::string_view Backlog
is related to SERVER-54352 StringData should offer std::string +... Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2021-03-22
Participants:
Linked BF Score: 161

 Description   

As an incidental change in SERVER-53399, the author added implicit conversions in both directions between StringData and std::string_view. Use of std::string_view is not generally allowed in the mongodb codebase, and this change has important API consequences that should be further considered. If nothing else, tests of the functionality would be needed if we keep it.



 Comments   
Comment by Githook User [ 21/Mar/21 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-55180 Convert SBE from std::string_view to StringData
Branch: master
https://github.com/mongodb/mongo/commit/393fe9da6a544af2aaea88eda037cfa3eea0da6d

Comment by Githook User [ 19/Mar/21 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: Revert "SERVER-55180 Convert SBE from std::string_view to StringData"

This reverts commit b0e48211b3cbda845bd18c3283fe0d5f5dcd98c6.
Branch: master
https://github.com/mongodb/mongo/commit/9c2fa2cdee7dfeee33760f40e80c53e5938faffe

Comment by Githook User [ 19/Mar/21 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-55180 Convert SBE from std::string_view to StringData

Remove implicit StringData <=> string_view conversions
Branch: master
https://github.com/mongodb/mongo/commit/b0e48211b3cbda845bd18c3283fe0d5f5dcd98c6

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