summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/collection_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/collection_impl.cpp')
-rw-r--r--src/mongo/db/catalog/collection_impl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/collection_impl.cpp b/src/mongo/db/catalog/collection_impl.cpp
index b4f3078a3c9..c028252f3b1 100644
--- a/src/mongo/db/catalog/collection_impl.cpp
+++ b/src/mongo/db/catalog/collection_impl.cpp
@@ -462,6 +462,7 @@ Status CollectionImpl::initFromExisting(OperationContext* opCtx,
// Update the idents for the newly initialized indexes.
for (const auto& sharedIdent : sharedIdents) {
auto desc = getIndexCatalog()->findIndexByName(opCtx, sharedIdent.first);
+ invariant(desc);
auto entry = getIndexCatalog()->getEntryShared(desc);
entry->setIdent(sharedIdent.second);
}