diff options
Diffstat (limited to 'src/mongo/db/commands/create_indexes.cpp')
-rw-r--r-- | src/mongo/db/commands/create_indexes.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp index 5d827ea27b0..93de2e317de 100644 --- a/src/mongo/db/commands/create_indexes.cpp +++ b/src/mongo/db/commands/create_indexes.cpp @@ -563,7 +563,10 @@ bool runCreateIndexesForMobile(OperationContext* opCtx, // the collection lock. ns = collection->ns(); - uassertStatusOK(indexer.drainBackgroundWrites(opCtx)); + uassertStatusOK( + indexer.drainBackgroundWrites(opCtx, + RecoveryUnit::ReadSource::kUnset, + IndexBuildInterceptor::DrainYieldPolicy::kYield)); } if (MONGO_unlikely(hangAfterIndexBuildFirstDrain.shouldFail())) { @@ -584,7 +587,10 @@ bool runCreateIndexesForMobile(OperationContext* opCtx, // the collection lock. ns = collection->ns(); - uassertStatusOK(indexer.drainBackgroundWrites(opCtx)); + uassertStatusOK( + indexer.drainBackgroundWrites(opCtx, + RecoveryUnit::ReadSource::kUnset, + IndexBuildInterceptor::DrainYieldPolicy::kNoYield)); } if (MONGO_unlikely(hangAfterIndexBuildSecondDrain.shouldFail())) { @@ -612,7 +618,10 @@ bool runCreateIndexesForMobile(OperationContext* opCtx, invariant(CollectionCatalog::get(opCtx).lookupCollectionByNamespace(ns)); // Perform the third and final drain while holding the exclusive collection lock. - uassertStatusOK(indexer.drainBackgroundWrites(opCtx)); + uassertStatusOK( + indexer.drainBackgroundWrites(opCtx, + RecoveryUnit::ReadSource::kUnset, + IndexBuildInterceptor::DrainYieldPolicy::kNoYield)); // This is required before completion. uassertStatusOK(indexer.checkConstraints(opCtx)); |