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

Change CollectionCloner to be tenant aware

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Server Serverless 2022-11-14, Server Serverless 2022-11-28

      Construct _sourceDbAndUuid using the DatabaseName object on the sourceNss as opposed to the db string.

      We'll need to send the tenantId in any commands run by the cloner -
      1. Pass the return value of DatabaseNameUtil::serialize for the dbName for the collStats command. If both multitenancySupport and featureFlagRequireTenantId are enabled, send the tenantId in the $tenant field in the body of the collStats command.
      2. To run the count command, the CollectionCloner calls DBClientBase::count. We'll need to correctly serialize the dbName we create from nsOrUuid. In _countCmd, we should set a $tenant field if nsOrUuid has a tenantId on the dbName.
      3. The CollectionCloner calls DBClientBase::getIndexSpecs. Similar to the count command, we'll need to correctly serialize the dbName we create in DBClientBase_getIndexSpec, and set a $tenant field if nsOrUuid has a tenantId on the dbName in makeListIndexesCommand. Then, we'll need to correctly deserialize the "ns" field using NamespaceStringUtil::deserialize.

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: