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

Create new command listDatabasesForAllTenants

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

      This command should take the same options as the existing listDatabases command, and return the same objects in the response, but with an extra field "tenant" in each object in the "databases" list (see the existing listCommands command here). So, today the response should look like:

      {
         "databases" : [
            {
               "name" : "xxx",
               "tenant": OID, // new field
               "sizeOnDisk" : xxx,
               "empty" : bool
            }
         ],
         "totalSize" : xxx,
         "totalSizeMb" : xxx,
         "ok" : 1
      }
      

      In order to get tenantID info from the CollectionCatalog, change StorageEngineImpl::listDatabases() to return a vector of TenantDatabaseNames. Then, we can split out the db name from the tenantId for each TenantDatabseName object, and include this information separately in the response, as described above.

      This command must only be allowed for the internal security user, when using traditional connection based auth. The "name" field should only contain the database name (and not the tenant prefix).

            Assignee:
            fernando.lisboa@mongodb.com Fernando Lisboa (Inactive)
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: