-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Service Arch
-
Fully Compatible
-
Service Arch 2023-12-11, Service Arch 2024-01-22, Service Arch 2024-02-05, Service Arch 2024-02-19, Service Arch 2024-03-04
-
171
The NamespaceString::ConstantProxy and DatabaseName::ConstantProxy classes currently uses std::call_once to provide access to a NamespaceString object; this is done on every access to the NamespaceString constants. Since std::call_once must do atomic operations, it is fairly expensive, and adds several hundred nanoseconds to opObserver calls just to check that an opObserver shouldn't run.
Additionally, before we had tenantId, getting the database for a NamespaceString was a cheap operation that just got a reference; it now requires a copy. Ideally we would have a DatabaseNameRef class that could be used almost anyplace a DatabaseName is, with DatabaseName reserved for when we need to actually store one.
- depends on
-
SERVER-84285 Add micro benchmark for NamespaceString
- Closed
-
SERVER-84311 Make NamespaceString inherit from DatabaseName
- Closed
- is related to
-
SERVER-80961 Introduce view types for DatabaseName
- Closed
- related to
-
SERVER-81613 Make OpObservers take less time when they aren't applicable
- Closed