diff options
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_d.cpp')
-rw-r--r-- | src/mongo/db/pipeline/pipeline_d.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp index 24732eef7b4..c980a234ee5 100644 --- a/src/mongo/db/pipeline/pipeline_d.cpp +++ b/src/mongo/db/pipeline/pipeline_d.cpp @@ -167,8 +167,12 @@ StatusWith<unique_ptr<PlanExecutor, PlanExecutor::Deleter>> createRandomCursorEx minWorkAdvancedRatio); } - return PlanExecutor::make( - opCtx, std::move(ws), std::move(root), coll, PlanExecutor::YIELD_AUTO); + return PlanExecutor::make(opCtx, + std::move(ws), + std::move(root), + coll, + opCtx->inMultiDocumentTransaction() ? PlanExecutor::INTERRUPT_ONLY + : PlanExecutor::YIELD_AUTO); } StatusWith<std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>> attemptToGetExecutor( |