summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/dbtests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/dbtests.cpp')
-rw-r--r--src/mongo/dbtests/dbtests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/dbtests/dbtests.cpp b/src/mongo/dbtests/dbtests.cpp
index 0ecc021f82d..67e1d45833e 100644
--- a/src/mongo/dbtests/dbtests.cpp
+++ b/src/mongo/dbtests/dbtests.cpp
@@ -105,8 +105,8 @@ Status createIndexFromSpec(OperationContext* opCtx, StringData ns, const BSONObj
Collection* coll;
{
WriteUnitOfWork wunit(opCtx);
- coll =
- CollectionCatalog::get(opCtx).lookupCollectionByNamespace(opCtx, NamespaceString(ns));
+ coll = CollectionCatalog::get(opCtx).lookupCollectionByNamespaceForMetadataWrite(
+ opCtx, NamespaceString(ns));
if (!coll) {
coll = autoDb.getDb()->createCollection(opCtx, NamespaceString(ns));
}