-
Type:
Task
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Service Arch
-
3
Instead of serializing database strings explicitly when building BSON docs with BSONObj builder, we should develop the following specific append overrides:
- append(StringData, DatabaseName, ValidatedTenancyScope)
- append(StringData, NamespaceString, ValidatedTenancyScope
these methods will internally call the serialization methods, but will allow us to depend on the compiler for remembering to always include a ValidatedTenancyScope
After refactoring existing usages, we also want to ensure it's hard (or impossible) to reintroduce issues in the future (appending namespaces incorrectly). Possible options coult be making it impossible using the API or a clang tidy rules to catch issues, etc.