[SERVER-77796] ASSERT problem finding stringifyForAssert overloads by ADL Created: 05/Jun/23  Updated: 29/Oct/23  Resolved: 06/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

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

Issue Links:
Depends
is depended on by SERVER-74488 Make NamespaceString::toString() private Closed
is depended on by SERVER-77729 Make NamespaceString override the str... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2023-06-12
Participants:

 Description   

We are overriding the stringifyForAssert for `NamespaceString` object when we removing `NampespaceStirng::toString()`.  But, it looks like the assert does not use the override function. 



 Comments   
Comment by Githook User [ 06/Jun/23 ]

Author:

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

Message: SERVER-77796 fix ADL lookup of stringifyForAssert
Branch: master
https://github.com/mongodb/mongo/commit/5efc7098ec741a5a304a97e587ee7ce0c9c85f34

Comment by Billy Donahue [ 05/Jun/23 ]

expediting to unblock SERVER-74488

Comment by Billy Donahue [ 05/Jun/23 ]

Specifically the argument-dependent lookup is disabled by a namespace qualified call.
The intent was to provide an extension hook name stringifyForAssert and a function that calls it with the proper augmented ADL, by bringing in a using decl before making an unqualified call. But I never seem to have made this distinction between the extension point and the invocation point very clearly.

Easy fix though!

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