diff options
author | David Storch <david.storch@mongodb.com> | 2021-12-21 11:15:42 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-21 11:55:50 +0000 |
commit | 19080405d9c7d08b54e70228a92d237223f2885c (patch) | |
tree | 73748cedfa62252c21968fdd4d0290972bbf3641 /src/mongo/db/repl/replication_recovery.cpp | |
parent | 58ca93e30a6436f47a8e8eaa3ddc831e376965dc (diff) | |
download | mongo-19080405d9c7d08b54e70228a92d237223f2885c.tar.gz |
SERVER-61385 Migrate callers of 'DBClientBase::query()' legacy API to the modern 'find()' API
There are a handful of remaining callers of the legacy API,
either using the exhaust option or which are involved in a
code path which still relies on the OP_QUERY-inspired BSON
format. These should be cleaned up as follow-up work.
Diffstat (limited to 'src/mongo/db/repl/replication_recovery.cpp')
-rw-r--r-- | src/mongo/db/repl/replication_recovery.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mongo/db/repl/replication_recovery.cpp b/src/mongo/db/repl/replication_recovery.cpp index 84323838172..afecf8da4f5 100644 --- a/src/mongo/db/repl/replication_recovery.cpp +++ b/src/mongo/db/repl/replication_recovery.cpp @@ -144,14 +144,9 @@ public: BSONObj predicate = _oplogApplicationEndPoint ? BSON("$gte" << _oplogApplicationStartPoint << "$lte" << *_oplogApplicationEndPoint) : BSON("$gte" << _oplogApplicationStartPoint); - _cursor = _client->query(NamespaceString::kRsOplogNamespace, - BSON("ts" << predicate), - /*querySettings*/ Query(), - /*limit*/ 0, - /*skip*/ 0, - /*projection*/ nullptr, - /*options*/ 0, - /*batchSize*/ 0); + FindCommandRequest findRequest{NamespaceString::kRsOplogNamespace}; + findRequest.setFilter(BSON("ts" << predicate)); + _cursor = _client->find(std::move(findRequest)); // Check that the first document matches our appliedThrough point then skip it since it's // already been applied. |