Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-62206

Remove DBClientBase::query_DEPRECATED() and migrate remaining callers

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • 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.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: