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

Apply CRUD ops using correct tenant namespace during oplog application

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

      When applying operations from the oplog, secondaries apply ops individually (except for inserts that can be grouped together). After SERVER-66708, the NamespaceString on each individual op should already contain the tenantId in the "tid" field, so this ticket is mainly about testing that this works - we can also add an invariant that the tenantId in the "ns" field matches that in the "tid" field in OplogApplierUtils::applyOplogEntryOrGroupedInsertsCommon.

      We can add unit tests checking that we can apply inserts, deletes, and updates correctly in OplogApplierImplTest (in oplog_applier_impl_test.cpp). Note we cannot test applying writes that are part of multi-document transactions until we correctly handle applying transaction commands as well.

            Assignee:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: