summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/find.cpp
diff options
context:
space:
mode:
authorArun Banala <arun.banala@mongodb.com>2020-11-02 18:09:28 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-01-07 20:04:53 +0000
commitc8ddb496f147e5a977eb668247b81da313d06e1d (patch)
tree34ba0cc443ec6294c5585d0951d5430cc69349e2 /src/mongo/db/query/find.cpp
parentd0cfd1d0c0fcfd75525a8d8f3a050876bc9d1e40 (diff)
downloadmongo-c8ddb496f147e5a977eb668247b81da313d06e1d.tar.gz
SERVER-51619 Convert find command input to IDL
Diffstat (limited to 'src/mongo/db/query/find.cpp')
-rw-r--r--src/mongo/db/query/find.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp
index e399de60858..167812995ac 100644
--- a/src/mongo/db/query/find.cpp
+++ b/src/mongo/db/query/find.cpp
@@ -86,7 +86,7 @@ bool shouldSaveCursor(OperationContext* opCtx,
PlanExecutor::ExecState finalState,
PlanExecutor* exec) {
const QueryRequest& qr = exec->getCanonicalQuery()->getQueryRequest();
- if (!qr.wantMore()) {
+ if (qr.isSingleBatch()) {
return false;
}
@@ -718,7 +718,7 @@ bool runQuery(OperationContext* opCtx,
LOGV2_DEBUG(20915,
5,
"Enough for first batch",
- "wantMore"_attr = qr.wantMore(),
+ "wantMore"_attr = !qr.isSingleBatch(),
"numToReturn"_attr = qr.getNToReturn().value_or(0),
"numResults"_attr = numResults);
break;