Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81820

Add NamespaceString and DatabaseName specific append methods to BSONObjBuilder

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 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.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: