summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/get_executor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/get_executor.cpp')
-rw-r--r--src/mongo/db/query/get_executor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/query/get_executor.cpp b/src/mongo/db/query/get_executor.cpp
index 195f4dadbea..0824723b4d6 100644
--- a/src/mongo/db/query/get_executor.cpp
+++ b/src/mongo/db/query/get_executor.cpp
@@ -861,7 +861,7 @@ protected:
if (_plannerParams.options & QueryPlannerParams::INCLUDE_SHARD_FILTER) {
stage = std::make_unique<ShardFilterStage>(
_cq->getExpCtxRaw(),
- CollectionShardingState::get(_opCtx, _cq->nss())
+ CollectionShardingState::assertCollectionLockedAndAcquire(_opCtx, _cq->nss())
->getOwnershipFilter(
_opCtx,
CollectionShardingState::OrphanCleanupPolicy::kDisallowOrphanCleanup),