Apply CRUD ops using correct tenant namespace during oplog application

XMLWordPrintableJSON

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

      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 (Inactive)
              Reporter:
              Janna Golden
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: