-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service Arch 2023-02-20
NamespaceString cannot be constexpr, but it defines several dozen k-constants for reserved namespace values. These are not 100% init-safe, as they have static nonlocal storage duration and can be accessed when they aren't ready by the initializers of other TUs in the system.
This can be worked around by changing the types of these constants to something that basically works like a NamespaceString, and is implicitly convertible to NamespaceString, but executes some memoizing instantiation code upon use.
This requires either repeating the huge and growing list of identifiers a few times, or simply moving the constant definitions into an x-macro definition table that can be expanded multiple times. The latter is much better, and has the side benefit of reducing code churn and interface bloat in the namespace_string component's source code.
- is related to
-
SERVER-73112 Move NamespaceString constructors private
- Closed