|
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.
|