Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2770

Use OP_MSG for exhaust cursors if the server supports OP_MSG

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Spec Comp
    • Labels:

      Background & Motivation

      Exhaust cursors with OP_QUERY currently error against 5.1 development servers with the server change in SERVER-57391.

      This only applies to C and Ruby. See the spreadsheet Drivers affected by removal of OP_QUERY (SERVER-57391 ).

      This is required in drivers that support exhaust cursors for 5.1 to avoid a loss of functionality.

      Scope
      Update the Find, getMore, killCursors specification to note that drivers must use OP_MSG if the server supports OP_MSG.

      Add a test for establishing an exhaust cursor. This may need to be a prose test since not all drivers support exhaust cursors.

      Drivers that already support exhaust cursors with OP_QUERY must update to use OP_MSG.

      Drivers that do not support exhaust cursors must not make any changes. The proposal to specify exhaust cursor behavior in DRIVERS-535 was rejected because there was no compelling use case.

      Original Description

      Downstream Change Summary

      OP_QUERY and OP_GET_MORE messages aren't supported anymore and the server would respond to them with an error OP_REPLY message.

      Description of Linked Ticket

      As part of removing support for OP_QUERY or OP_GET_MORE, the server should return an error indicating that these wire protocol op codes are no longer supported.

      However, we need to make sure that the server continues to accept OP_QUERY isMaster commands so that the connection handshake continues to work.

      We should ensure that we still count attempted uses of OP_QUERY and OP_GET_MORE in db.serverStatus().opcounters.deprecated. We must also continue to log warning id 5578800, e.g.:

      {"t":{"$date":"2021-06-03T11:35:40.983-04:00"},"s":"W",  "c":"COMMAND",  "id":5578800, "ctx":"conn1","msg":"Deprecated operation requested","attr":{"op":"query","clientInfo":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"5.0.0-alpha0"},"os":{"type":"Linux","name":"Ubuntu","architecture":"x86_64","version":"18.04"}}}}
      

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            esha.bhargava@mongodb.com Esha Bhargava
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: