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

Add NamespaceString and DatabaseName specific append methods to BSONObjBuilder

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Service Arch
    • 3

    Description

      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.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: