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

Make pre-image collection multi-tenant

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • QE 2022-10-03, QE 2022-10-17

      This ticket is about making pre-images collection multi-tenant. A pre-images collection was introduced in the project PM-1944 and had no multi-tenancy support. As part of this ticket, we will introduce multi-tenancy to it.

      For this, we need to perform inserts and lookups on the pre-image collection for the provided tenant. There can be several pre-images collected in a node.

      The tenant can be retrieved for the namespace object, ie. ns.dbName().tenantId().

      Then, a pre-images namespace can be created using the function NamespaceString::makePreImageCollectionNSS(<tenantId>).

      A tenant Id must be resolved before passing to any function, this can be done by calling the function change_stream_serverless_helpers::resolveTenantId().

      We should also extend the JS test - jstests/serverless/change_streams/multitenant_read_from_change_collection.js for the pre-images collection.

            Assignee:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Reporter:
            rishab.joshi@mongodb.com Rishab Joshi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: