diff options
Diffstat (limited to 'src/mongo/db/index_builds_coordinator.cpp')
-rw-r--r-- | src/mongo/db/index_builds_coordinator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp index 0c5a689182b..74d1f2ddcab 100644 --- a/src/mongo/db/index_builds_coordinator.cpp +++ b/src/mongo/db/index_builds_coordinator.cpp @@ -2453,8 +2453,9 @@ void IndexBuildsCoordinator::_runIndexBuildInner( // dropped while the index build is still registered for the collection -- until abortIndexBuild // is called. The collection can be renamed, but it is OK for the name to be stale just for // logging purposes. - auto collection = CollectionCatalog::get(opCtx).lookupCollectionByUUIDForRead( + auto collectionSharedPtr = CollectionCatalog::get(opCtx).lookupCollectionByUUIDForRead( opCtx, replState->collectionUUID); + CollectionPtr collection(collectionSharedPtr.get(), CollectionPtr::NoYieldTag{}); invariant(collection, str::stream() << "Collection with UUID " << replState->collectionUUID << " should exist because an index build is in progress: " |