diff options
Diffstat (limited to 'src/mongo/db/query/plan_executor_sbe.cpp')
-rw-r--r-- | src/mongo/db/query/plan_executor_sbe.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/query/plan_executor_sbe.cpp b/src/mongo/db/query/plan_executor_sbe.cpp index 791408aeb9c..51f94f70a43 100644 --- a/src/mongo/db/query/plan_executor_sbe.cpp +++ b/src/mongo/db/query/plan_executor_sbe.cpp @@ -272,14 +272,13 @@ PlanExecutor::ExecState PlanExecutorSBE::getNextImpl(ObjectType* out, RecordId* // // Note that we need to hold a database intent lock before acquiring a notifier. boost::optional<AutoGetCollectionForReadMaybeLockFree> coll; - insert_listener::CappedInsertNotifierData cappedInsertNotifierData; + std::unique_ptr<insert_listener::Notifier> notifier; if (insert_listener::shouldListenForInserts(_opCtx, _cq.get())) { if (!_opCtx->lockState()->isCollectionLockedForMode(_nss, MODE_IS)) { coll.emplace(_opCtx, _nss); } - cappedInsertNotifierData.notifier = - insert_listener::getCappedInsertNotifier(_opCtx, _nss, _yieldPolicy.get()); + notifier = insert_listener::getCappedInsertNotifier(_opCtx, _nss, _yieldPolicy.get()); } for (;;) { @@ -324,7 +323,7 @@ PlanExecutor::ExecState PlanExecutorSBE::getNextImpl(ObjectType* out, RecordId* return PlanExecutor::ExecState::IS_EOF; } - insert_listener::waitForInserts(_opCtx, _yieldPolicy.get(), &cappedInsertNotifierData); + insert_listener::waitForInserts(_opCtx, _yieldPolicy.get(), notifier); // There may be more results, keep going. continue; } else if (_resumeRecordIdSlot) { |