[SERVER-62393] Apply CRUD ops using correct tenant namespace during oplog application Created: 06/Jan/22  Updated: 29/Oct/23  Resolved: 15/Sep/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Janna Golden Assignee: Hugh Tong (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-61994 Change CollectionCatalog maps that ar... Closed
depends on SERVER-62780 Create tenantId decoration on opCtx f... Closed
is depended on by SERVER-69726 Run multitenancy tests on replica sets Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2022-08-08, Server Serverless 2022-08-22, Server Serverless 2022-09-05, Server Serverless 2022-09-19
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 09/Sep/22 ]

Author:

{'name': 'Hugh Tong', 'email': 'hugh.tong@mongodb.com', 'username': 'cortrain'}

Message: SERVER-62393 Apply CRUD ops using correct tenant namespace during oplog application
Branch: master
https://github.com/mongodb/mongo/commit/18c39bc1e395412f1aa69d98a1ac1e39bfa48d9b

Generated at Thu Feb 08 05:55:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.