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

Change BasicCommandWithReplyBuilderInterface to use DatabaseName

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Server Serverless 2022-07-11

      Change the BasicCommandReplyBuilderInterface::invocation class to hold a DatabaseName object instead of a string for the db name. When constructing the db name member, we can grab the validated tenant from the OpMsg. Also change the following functions to take in DatabaseName rather than string as well -

      • BasicCommandReplyBuilderInterface::runWithReplyBuilder
      • BasicCommandReplyBuilderInterface::runAsync
      • BasicCommandWithRequestParser::runWithReplyBuilder
      • BasicCommand::runWithReplyBuilder

      BasicCommandWithRequestParser::runWithReplyBuilder and BasicCommand::runWithReplyBuilder call other run() functions that take in a db name as a string - we'll change these in future tickets, so for now can just pass DatabaseName::toStringWithTenantId() to them.

      We'll need to change the overridden runWithReplyBuilder() functions for any commands that inherit directly from BasicCommandReplyBuilderInterface - the HelloCmd and ClusterHelloCmd should be the only two.

            Assignee:
            fernando.lisboa@mongodb.com Fernando Lisboa (Inactive)
            Reporter:
            sophia.tan@mongodb.com Sophia Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: