summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_applier_impl.cpp
diff options
context:
space:
mode:
authorChristopher Caplinger <christopher.caplinger@mongodb.com>2022-06-23 00:59:11 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-23 01:50:02 +0000
commit8d04153c3db149e9f6224e3c2cab31b8d66154fe (patch)
tree60389d86cf066e9bebf37ec3fac673bddf09dc9c /src/mongo/db/repl/oplog_applier_impl.cpp
parent09d251fb165d7f5976ed707a3ed16d12f6da945f (diff)
downloadmongo-8d04153c3db149e9f6224e3c2cab31b8d66154fe.tar.gz
SERVER-66919: Serialize all writes to tenant migration namespaces
Diffstat (limited to 'src/mongo/db/repl/oplog_applier_impl.cpp')
-rw-r--r--src/mongo/db/repl/oplog_applier_impl.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/mongo/db/repl/oplog_applier_impl.cpp b/src/mongo/db/repl/oplog_applier_impl.cpp
index e9ca22da35c..575035711e0 100644
--- a/src/mongo/db/repl/oplog_applier_impl.cpp
+++ b/src/mongo/db/repl/oplog_applier_impl.cpp
@@ -623,8 +623,6 @@ void OplogApplierImpl::_deriveOpsAndFillWriterVectors(
LogicalSessionIdMap<std::vector<OplogEntry*>> partialTxnOps;
CachedCollectionProperties collPropertiesCache;
- // Used to serialize writes to the tenant migrations donor and recipient namespaces.
- boost::optional<uint32_t> tenantMigrationsWriterId;
for (auto&& op : *ops) {
// If the operation's optime is before or the same as the beginApplyingOpTime we don't want
// to apply it, so don't include it in writerVectors.
@@ -706,19 +704,6 @@ void OplogApplierImpl::_deriveOpsAndFillWriterVectors(
continue;
}
- // Writes to the tenant migration namespaces must be serialized to preserve the order of
- // migration and access blocker states.
- if (op.getNss() == NamespaceString::kTenantMigrationDonorsNamespace ||
- op.getNss() == NamespaceString::kTenantMigrationRecipientsNamespace) {
- auto writerId = OplogApplierUtils::addToWriterVector(
- opCtx, &op, writerVectors, &collPropertiesCache, tenantMigrationsWriterId);
- if (!tenantMigrationsWriterId) {
- tenantMigrationsWriterId.emplace(writerId);
- } else {
- invariant(writerId == *tenantMigrationsWriterId);
- }
- continue;
- }
OplogApplierUtils::addToWriterVector(opCtx, &op, writerVectors, &collPropertiesCache);
}
}