Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1385

_first_batch responses are not upconverted for command monitoring

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6
    • Component/s: Monitoring
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change

      Description

      According to the command monitoring spec:

      All legacy operations MUST be converted to their equivalent commands in the 3.2 server in the event's command and reply fields. This includes OP_INSERT, OP_DELETE, OP_UPDATE, OP_QUERY, OP_GET_MORE and OP_KILL_CURSORS.

      https://github.com/mongodb/specifications/blob/master/source/command-monitoring/command-monitoring.rst#upconversion

      However, pymongo.helpers._first_batch publishes a command event in the internal format returned from pymongo.helpers._unpack_response:

      {
              'cursor_id': <long>,
              'starting_from': <int>,
              'number_returned': <int>,
              'data': [OP_QUERY documents...] ,
      }
      

      This affects pymongo's helpers for listIndexes, listCollections, currentOp, and fsyncUnlock.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: