diff options
author | Arun Banala <arun.banala@mongodb.com> | 2020-11-02 18:09:28 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-07 20:04:53 +0000 |
commit | c8ddb496f147e5a977eb668247b81da313d06e1d (patch) | |
tree | 34ba0cc443ec6294c5585d0951d5430cc69349e2 /src/mongo/shell | |
parent | d0cfd1d0c0fcfd75525a8d8f3a050876bc9d1e40 (diff) | |
download | mongo-c8ddb496f147e5a977eb668247b81da313d06e1d.tar.gz |
SERVER-51619 Convert find command input to IDL
Diffstat (limited to 'src/mongo/shell')
-rw-r--r-- | src/mongo/shell/bench.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/shell/bench.cpp b/src/mongo/shell/bench.cpp index 71c7d8349f3..6aaf8a679ad 100644 --- a/src/mongo/shell/bench.cpp +++ b/src/mongo/shell/bench.cpp @@ -244,7 +244,7 @@ int runQueryWithReadCommands(DBClientBase* conn, int count = cursorResponse.getBatch().size(); if (objOut) { - invariant(qr->getLimit() && *qr->getLimit() == 1 && !qr->wantMore()); + invariant(qr->getLimit() && *qr->getLimit() == 1 && qr->isSingleBatch()); // Since this is a "single batch" query, we can simply grab the first item in the result set // and return here. *objOut = (count > 0) ? cursorResponse.getBatch()[0] : BSONObj(); @@ -294,7 +294,7 @@ Timestamp getLatestClusterTime(DBClientBase* conn) { auto qr = std::make_unique<QueryRequest>(NamespaceString("local.oplog.rs")); qr->setSort(BSON("$natural" << -1)); qr->setLimit(1LL); - qr->setWantMore(false); + qr->setSingleBatchField(true); invariant(qr->validate()); const auto dbName = qr->nss().db().toString(); @@ -995,7 +995,7 @@ void BenchRunOp::executeOnce(DBClientBase* conn, qr->setFilter(fixedQuery); qr->setProj(this->projection); qr->setLimit(1LL); - qr->setWantMore(false); + qr->setSingleBatchField(true); if (config.useSnapshotReads) { qr->setReadConcern(readConcernSnapshot); } |