Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4244

Use OP_MSG for exhaust cursors on 4.2+ servers

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.25.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Background and motivation
      5.1+ servers do not support exhaust cursors over OP_QUERY. CDRIVER-4130 changed the exhaust cursor implementation to fallback to a non-exhaust cursor on 5.1 servers.

      This is permitted by the Find, getMore and killCursors commands. specification:

      Server version Driver behavior
      4.0 and earlier Drivers MUST use legacy OP_QUERY.
      4.2 to 5.0 Drivers SHOULD use OP_MSG but MAY use legacy OP_QUERY.
      5.1 and later Drivers MUST only use OP_MSG. Alternatively, drivers MAY fallback to a non-exhaust cursor when an exhaust cursor is requested.

      See PyMongo for a reference implementation of Exhaust Cursors with OP_MSG: PYTHON-1636.

      Scope

      • Satisfy the "SHOULD" statement for server 4.2 to 5.0. Implement exhaust cursors with OP_MSG.
      • Do not fallback to a non-exhaust cursors on 5.1.

            Assignee:
            adrian.dole@mongodb.com Adrian Dole
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: