-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Server Serverless 2022-09-05, Server Serverless 2022-09-19, Server Serverless 2022-10-03, Server Serverless 2022-10-31
-
163
An applyOps oplog entry contains a list of individual ops to apply in its "o" field. Each of these ops should have a "tid" field, and the outer applyOps oplog entry should have a "tid" field as well, i.e. it should look something like:
{ op: "c", "ns" : "<dbName>.$cmd", "tid": <tenantId>, "o" : { "applyOps" : [ { "op" : "i", "ns" : <dbName>.<coll>, "tid": <tenantId>, "o" : { ...}, } ] }
Change applyOps to take a DatabaseName obj, and then pass the DatabaseName object from the nss field to applyOps in applyApplyOpsOplogEntry, so that the DatabseName can be used to lock the db. Then, in _applyOps we should construct the NamespaceString for each individual op using the "nss" and "tid" fields.
When writing oplog entries for ops that occurred as part of a transaction, we log an applyOps entry upon either prepareTransaction or commitTransaction (for an unprepared transaction). When applying these operations during oplog application, we'll apply each op individually.
- has to be done before
-
SERVER-70540 Enable multi-tenancy support for oplog applications for txn cases.
- Closed
- is depended on by
-
SERVER-69726 Run multitenancy tests on replica sets
- Closed