summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/multi_plan.cpp
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2022-04-05 21:59:50 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-18 17:49:25 +0000
commitb731a58ff399ae1558bbaa0fb9b3da1d49d18313 (patch)
treea509f768b0f071f055c76ce12276f18d0e717c6e /src/mongo/db/exec/multi_plan.cpp
parent42462dcdfe60f5f98d82e0e91fd5ac8218933b0d (diff)
downloadmongo-b731a58ff399ae1558bbaa0fb9b3da1d49d18313.tar.gz
SERVER-65270 Fix bug related to queries on large documents not respecting the sort option
(cherry picked from commit 5b5b505f0db2e145f40bde4e2ac2d5c56bc0b263)
Diffstat (limited to 'src/mongo/db/exec/multi_plan.cpp')
-rw-r--r--src/mongo/db/exec/multi_plan.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/exec/multi_plan.cpp b/src/mongo/db/exec/multi_plan.cpp
index 96aaf4ca52d..f7ca2b1432b 100644
--- a/src/mongo/db/exec/multi_plan.cpp
+++ b/src/mongo/db/exec/multi_plan.cpp
@@ -111,7 +111,7 @@ PlanStage::StageState MultiPlanStage::doWork(WorkingSetID* out) {
// Look for an already produced result that provides the data the caller wants.
if (!bestPlan.results.empty()) {
*out = bestPlan.results.front();
- bestPlan.results.pop();
+ bestPlan.results.pop_front();
return PlanStage::ADVANCED;
}
@@ -265,7 +265,7 @@ bool MultiPlanStage::workAllPlans(size_t numResults, PlanYieldPolicy* yieldPolic
// Ensure that the BSONObj underlying the WorkingSetMember is owned in case we choose to
// return the results from the 'candidate' plan.
member->makeObjOwnedIfNeeded();
- candidate.results.push(id);
+ candidate.results.push_back(id);
// Once a plan returns enough results, stop working.
if (candidate.results.size() >= numResults) {