summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/tenant_file_importer_service.cpp
diff options
context:
space:
mode:
authorChristopher Caplinger <christopher.caplinger@mongodb.com>2022-04-06 15:39:11 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-06 18:22:40 +0000
commitddf7d937d4228b16d03935296480c345e4bdd171 (patch)
tree06061797473d7b73667a163c8d06f7e1c76cb8d9 /src/mongo/db/repl/tenant_file_importer_service.cpp
parenta6593ef1b2671c3ea126097bac3b9b6ab2138c2d (diff)
downloadmongo-ddf7d937d4228b16d03935296480c345e4bdd171.tar.gz
SERVER-63122: Remove logical cloning procedure for shard merge protocol
Diffstat (limited to 'src/mongo/db/repl/tenant_file_importer_service.cpp')
-rw-r--r--src/mongo/db/repl/tenant_file_importer_service.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mongo/db/repl/tenant_file_importer_service.cpp b/src/mongo/db/repl/tenant_file_importer_service.cpp
index 0c1e3f1e44b..b315b7f43d3 100644
--- a/src/mongo/db/repl/tenant_file_importer_service.cpp
+++ b/src/mongo/db/repl/tenant_file_importer_service.cpp
@@ -107,12 +107,15 @@ void importCopiedFiles(OperationContext* opCtx,
donorConnectionString);
}
- // TODO SERVER-63122: Remove the try-catch block once logical cloning is removed for
- // shard merge protocol.
- try {
- wiredTigerImportFromBackupCursor(opCtx, metadatas, tempWTDirectory.string());
- } catch (const ExceptionFor<ErrorCodes::NamespaceExists>& ex) {
- LOGV2_WARNING(6113314, "Temporarily ignoring the error", "error"_attr = ex.toStatus());
+ wiredTigerImportFromBackupCursor(opCtx, metadatas, tempWTDirectory.string());
+
+ auto catalog = CollectionCatalog::get(opCtx);
+ for (auto&& m : metadatas) {
+ Lock::CollectionLock systemViewsLock(
+ opCtx,
+ NamespaceString(m.ns.db(), NamespaceString::kSystemDotViewsCollectionName),
+ MODE_X);
+ uassertStatusOK(catalog->reloadViews(opCtx, m.ns.db()));
}
}
} // namespace