diff options
Diffstat (limited to 'src/mongo/db/s/shard_local.cpp')
-rw-r--r-- | src/mongo/db/s/shard_local.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/s/shard_local.cpp b/src/mongo/db/s/shard_local.cpp index 9b432100426..8b293435bfb 100644 --- a/src/mongo/db/s/shard_local.cpp +++ b/src/mongo/db/s/shard_local.cpp @@ -127,9 +127,11 @@ Status ShardLocal::createIndexOnConfig(OperationContext* opCtx, invariant(ns.db() == "config" || ns.db() == "admin"); try { + // TODO SERVER-50983: Create abstraction for creating collection when using + // AutoGetCollection AutoGetOrCreateDb autoDb(opCtx, ns.db(), MODE_IX); AutoGetCollection autoColl(opCtx, ns, MODE_X); - auto collection = autoColl.getCollection(); + const Collection* collection = autoColl.getCollection().get(); if (!collection) { CollectionOptions options; options.uuid = UUID::gen(); |