summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/catalog_control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/catalog_control.cpp')
-rw-r--r--src/mongo/db/catalog/catalog_control.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/db/catalog/catalog_control.cpp b/src/mongo/db/catalog/catalog_control.cpp
index 98219a55b95..79b3126d9ff 100644
--- a/src/mongo/db/catalog/catalog_control.cpp
+++ b/src/mongo/db/catalog/catalog_control.cpp
@@ -149,8 +149,7 @@ void reopenAllDatabasesAndReloadCollectionCatalog(OperationContext* opCtx,
// Opening CollectionCatalog: The collection catalog is now in sync with the storage engine
// catalog. Clear the pre-closing state.
- CollectionCatalog::write(opCtx,
- [&](CollectionCatalog& catalog) { catalog.onOpenCatalog(opCtx); });
+ CollectionCatalog::write(opCtx, [](CollectionCatalog& catalog) { catalog.onOpenCatalog(); });
opCtx->getServiceContext()->incrementCatalogGeneration();
LOGV2(20278, "openCatalog: finished reloading collection catalog");
}
@@ -210,14 +209,13 @@ PreviousCatalogState closeCatalog(OperationContext* opCtx) {
// Need to mark the CollectionCatalog as open if we our closeAll fails, dismissed if successful.
ScopeGuard reopenOnFailure([opCtx] {
CollectionCatalog::write(opCtx,
- [&](CollectionCatalog& catalog) { catalog.onOpenCatalog(opCtx); });
+ [](CollectionCatalog& catalog) { catalog.onOpenCatalog(); });
});
// Closing CollectionCatalog: only lookupNSSByUUID will fall back to using pre-closing state to
// allow authorization for currently unknown UUIDs. This is needed because authorization needs
// to work before acquiring locks, and might otherwise spuriously regard a UUID as unknown
// while reloading the catalog.
- CollectionCatalog::write(opCtx,
- [&](CollectionCatalog& catalog) { catalog.onCloseCatalog(opCtx); });
+ CollectionCatalog::write(opCtx, [](CollectionCatalog& catalog) { catalog.onCloseCatalog(); });
LOGV2_DEBUG(20270, 1, "closeCatalog: closing collection catalog");