Add NamespaceString and DatabaseName specific append methods to BSONObjBuilder

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch
    • 3
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              [DO NOT USE] Backlog - Service Architecture
              Reporter:
              Matt Broadstone
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: