-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Client
-
None
-
Fully Compatible
-
QO 2022-02-07, QO 2022-02-21, QO 2022-03-07, QO 2022-03-21, QO 2022-04-04, QO 2022-04-18, QE 2022-05-02, QE 2022-05-16, QE 2022-05-30, QE 2022-06-13, QE 2022-06-27
This is follow-up work to related tickets SERVER-59512 and SERVER-61385. SERVER-59512 introduced DBClientBase::find() as a replacement for DBClientBase::query(). The essential difference between the two is that find() accepts a FindCommandRequest whereas query() accepted something resembling an OP_QUERY, even though the OP_QUERY find format was deprecated in 5.0 and removed in 5.1. SERVER-61385 renamed DBClientBase::query() to DBClientBase::query_DEPRECATED() and migrated almost all callers to DBClientBase::find().
The work for this ticket is to move all lingering remaining callers off DBClientBase::query_DEPRECATED() so that the old API can be deleted from the internal client code. There are three major categories of callers which must be dealt with:
- Callers which run exhaust queries. The new find() API needs to be improved to support exhaust in order to allow these callers to be migrated.
- Callers which rely on the DBClientCursorBatchIterator overload of query_DEPRECATED(). The callers either need to be refactored, or some equivalent of DBClientCursorBatchIterator needs to be introduced to the find() API.
- Callers which still construct an OP_QUERY-style BSON payload, and need it to be parsed to a FindCommandRequest. In particular, this includes the code for dealing with the precondition of an applyOps command, and the call site for the shell in mozjs/mongo.cpp.
- causes
-
SERVER-68007 Clonning phase of the movePrimary cmd should specify a valid afterClusterTime
- Closed
- is related to
-
SERVER-67544 Coverity analysis defect 122382: Uninitialized scalar field
- Closed
-
SERVER-59512 Introduce new find API to DBClientBase which uses IDL-generated FindCommandRequest
- Closed
-
SERVER-61385 Migrate most callers of legacy 'DBClientBase::query()' API to modern 'find()' API
- Closed