From 9af1defd2b1b831322e716baa8a4e54b27bd534a Mon Sep 17 00:00:00 2001 From: Gregory Wlodarek Date: Wed, 15 May 2019 15:20:11 -0400 Subject: SERVER-37988 Add an optional predicate argument in forEachCollectionFromDb() to allow skipping unsatisfied collections without grabbing them in the desired lock mode --- src/mongo/db/commands/dbhash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mongo/db/commands/dbhash.cpp') diff --git a/src/mongo/db/commands/dbhash.cpp b/src/mongo/db/commands/dbhash.cpp index 9cb4a5adbd5..d93488bbacf 100644 --- a/src/mongo/db/commands/dbhash.cpp +++ b/src/mongo/db/commands/dbhash.cpp @@ -223,7 +223,7 @@ public: opCtx, dbname, MODE_IS, - [&](Collection* collection, CollectionCatalogEntry* catalogEntry) { + [&](const Collection* collection, const CollectionCatalogEntry* catalogEntry) { auto collNss = collection->ns(); if (collNss.size() - 1 <= dbname.size()) { -- cgit v1.2.1